From: Ryan Bloom Date: Tue, 8 Jan 2002 06:26:10 +0000 (+0000) Subject: Add the ability to pass flags to both apr_file_open and apr_mktemp. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7aec71d88079f27be72d8957029834f8427f62d8;p=apache Add the ability to pass flags to both apr_file_open and apr_mktemp. The reason for this, is that it is very possible to want a temp file that isn't deleted when the file is closed. It also makes sense to have the flags in the apr_file_t if possible. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92766 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index 53d183accb..493156a0f4 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -892,7 +892,7 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest, return FALSE; } - if ((rv = apr_os_file_put(&fd, tf->hFile, r->pool)) != APR_SUCCESS) { + if ((rv = apr_os_file_put(&fd, tf->hFile, 0, r->pool)) != APR_SUCCESS) { return FALSE; } diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 47355f782e..7648caa1cb 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -531,8 +531,8 @@ static int cgid_server(void *data) procnew = apr_pcalloc(ptrans, sizeof(*procnew)); r->pool = ptrans; get_req(sd2, r, &argv0, &env, &req_type); - apr_os_file_put(&r->server->error_log, &errfileno, r->pool); - apr_os_file_put(&inout, &sd2, r->pool); + apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool); + apr_os_file_put(&inout, &sd2, 0, r->pool); if (req_type == SSI_REQ) { in_pipe = APR_NO_PIPE; @@ -941,7 +941,7 @@ static int cgid_handler(request_rec *r) /* We are putting the tempsock variable into a file so that we can use * a pipe bucket to send the data to the client. */ - apr_os_file_put(&tempsock, &sd, r->pool); + apr_os_file_put(&tempsock, &sd, 0, r->pool); if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) return retval; @@ -1208,7 +1208,7 @@ static int include_cmd(include_ctx_t *ctx, apr_bucket_brigade **bb, char *comman /* We are putting the tempsock variable into a file so that we can use * a pipe bucket to send the data to the client. */ - apr_os_file_put(&tempsock, &sd, r->pool); + apr_os_file_put(&tempsock, &sd, 0, r->pool); if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) return retval; diff --git a/support/htdigest.c b/support/htdigest.c index f4df5ad2f1..8adb564960 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -264,7 +264,7 @@ int main(int argc, char *argv[]) else if (argc != 4) usage(); - if (apr_file_mktemp(&tfp, tn, cntxt) != APR_SUCCESS) { + if (apr_file_mktemp(&tfp, tn, 0, cntxt) != APR_SUCCESS) { fprintf(stderr, "Could not open temp file.\n"); exit(1); }