From: Ryan Bloom Date: Thu, 14 Oct 1999 14:36:49 +0000 (+0000) Subject: I missed one function when swapping paramters. This fixes it. I think I X-Git-Tag: 1.3.10~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=234823c5c579b53c8e5fef171538cdff47171c22;p=apache I missed one function when swapping paramters. This fixes it. I think I have caught them all this time. I really hope this is the final time I have to swap parameters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83996 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c index cebc4c7f55..6c7f9a19e1 100644 --- a/modules/generators/mod_asis.c +++ b/modules/generators/mod_asis.c @@ -79,8 +79,8 @@ static int asis_handler(request_rec *r) return NOT_FOUND; } - if (ap_open(&f, r->pool, r->filename, APR_READ | APR_BUFFERED, - APR_OS_DEFAULT) != APR_SUCCESS) { + if (ap_open(&f, r->filename, APR_READ | APR_BUFFERED, + APR_OS_DEFAULT, r->pool) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, r, "file permissions deny server access: %s", r->filename); return FORBIDDEN; diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 4e91acd839..8156f2fcc8 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -986,8 +986,8 @@ static void emit_head(request_rec *r, char *header_fname, int suppress_amble, * the file's contents, any HTML header it had won't end up * where it belongs. */ - if (ap_open(&f, r->pool, rr->filename, APR_READ | APR_BUFFERED, - APR_OS_DEFAULT) == APR_SUCCESS) { + if (ap_open(&f, rr->filename, APR_READ | APR_BUFFERED, + APR_OS_DEFAULT, r->pool) == APR_SUCCESS) { emit_preamble(r, title); emit_amble = 0; do_emit_plain(r, f); @@ -1054,8 +1054,8 @@ static void emit_tail(request_rec *r, char *readme_fname, int suppress_amble) /* * If we can open the file, suppress the signature. */ - if (ap_open(&f, r->pool, rr->filename, APR_READ | APR_BUFFERED, - APR_OS_DEFAULT) == APR_SUCCESS) { + if (ap_open(&f, rr->filename, APR_READ | APR_BUFFERED, + APR_OS_DEFAULT, r->pool) == APR_SUCCESS) { do_emit_plain(r, f); ap_close(f); suppress_sig = 1; @@ -1090,8 +1090,8 @@ static char *find_title(request_rec *r) "text/html") || !strcmp(r->content_type, INCLUDES_MAGIC_TYPE)) && !r->content_encoding) { - if (ap_open(&thefile, r->pool, r->filename, APR_READ | APR_BUFFERED, - APR_OS_DEFAULT) != APR_SUCCESS) { + if (ap_open(&thefile, r->filename, APR_READ | APR_BUFFERED, + APR_OS_DEFAULT, r->pool) != APR_SUCCESS) { return NULL; } n = sizeof(char) * (MAX_STRING_LEN - 1); diff --git a/modules/http/http_core.c b/modules/http/http_core.c index c8ac4cef6a..852b95a04e 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2515,7 +2515,7 @@ static int default_handler(request_rec *r) return METHOD_NOT_ALLOWED; } - if (ap_open (&fd, r->pool, r->filename, APR_READ | APR_BINARY, 0) != APR_SUCCESS) { + if (ap_open (&fd, r->filename, APR_READ | APR_BINARY, 0, r->pool) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, r, "file permissions deny server access: %s", r->filename); return FORBIDDEN; diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 16267a7f29..ce20a8ccd0 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -1001,7 +1001,7 @@ static config_log_state *open_config_log(server_rec *s, ap_context_t *p, } else { const char *fname = ap_server_root_relative(p, cls->fname); - if (ap_open(&cls->log_fd, p, fname, xfer_flags, xfer_mode) != APR_SUCCESS) { + if (ap_open(&cls->log_fd, fname, xfer_flags, xfer_mode, p) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, s, "could not open transfer log file %s.", fname); exit(1); diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 21bfdb3f5a..0da1fa0494 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -782,8 +782,8 @@ static int read_type_map(negotiation_state *neg, request_rec *rr) /* We are not using multiviews */ neg->count_multiviews_variants = 0; - if (ap_open(&map, neg->pool, rr->filename, APR_READ | APR_BUFFERED, - APR_OS_DEFAULT) != APR_SUCCESS) { + if (ap_open(&map, rr->filename, APR_READ | APR_BUFFERED, + APR_OS_DEFAULT, neg->pool) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, r, "cannot access type map file: %s", rr->filename); return HTTP_FORBIDDEN; diff --git a/server/log.c b/server/log.c index 72eeb7cfd3..39c9cd8463 100644 --- a/server/log.c +++ b/server/log.c @@ -260,8 +260,8 @@ static void open_error_log(server_rec *s, ap_context_t *p) else { fname = ap_server_root_relative(p, s->error_fname); /* Change to AP funcs. */ - if (ap_open(&s->error_log, p, fname, APR_BUFFERED | APR_APPEND | - APR_READ | APR_WRITE, APR_OS_DEFAULT) != APR_SUCCESS) { + if (ap_open(&s->error_log, fname, APR_BUFFERED | APR_APPEND | + APR_READ | APR_WRITE, APR_OS_DEFAULT, p) != APR_SUCCESS) { perror("fopen"); fprintf(stderr, "%s: could not open error log file %s.\n", ap_server_argv0, fname); @@ -554,7 +554,7 @@ void ap_log_pid(ap_context_t *p, const char *fname) ); } - if(ap_open(&pid_file, p, fname, APR_WRITE | APR_BUFFERED, APR_OS_DEFAULT) != APR_SUCCESS) { + if(ap_open(&pid_file, fname, APR_WRITE | APR_BUFFERED, APR_OS_DEFAULT, p) != APR_SUCCESS) { perror("fopen"); fprintf(stderr, "%s: could not log pid to file %s\n", ap_server_argv0, fname); diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 50aab1f335..3173a150ef 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -541,8 +541,8 @@ static void accept_mutex_init(ap_context_t *p) unlock_it.l_pid = 0; /* pid not actually interesting */ expand_lock_fname(p); - ap_open(&tempfile, p, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL, - APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD); + ap_open(&tempfile, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL, + APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p); ap_get_os_file(&lock_fd, tempfile); if (lock_fd == -1) { perror("open"); @@ -604,7 +604,7 @@ static void accept_mutex_child_init(ap_context_t *p) { ap_file_t *tempfile; - ap_open(&tempfile, p, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE); + ap_open(&tempfile, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, p); if (!tempfile) { ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, "Child cannot open lock file: %s", ap_lock_fname); @@ -623,8 +623,8 @@ static void accept_mutex_init(ap_context_t *p) expand_lock_fname(p); unlink(ap_lock_fname); - ap_open(&tempfile, p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, - APR_UREAD|APR_UWRITE); + ap_open(&tempfile, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL, + APR_UREAD|APR_UWRITE, p); if (!tempfile) { ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf, "Parent cannot open lock file: %s", ap_lock_fname); diff --git a/server/util.c b/server/util.c index 9900793ee5..a71097a75b 100644 --- a/server/util.c +++ b/server/util.c @@ -877,7 +877,7 @@ API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name) return NULL; } - stat = ap_open(&file, p, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT); + stat = ap_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p); #ifdef DEBUG saved_errno = errno; ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL,