diff options
89 files changed, 546 insertions, 546 deletions
diff --git a/include/ap_mpm.h b/include/ap_mpm.h index e7a1f7b535..73ee7e3014 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -85,7 +85,7 @@ However the MPM may choose to terminate processes when the user requests a non-graceful restart/stop. When this occurs, the MPM kills all threads with extreme prejudice, and destroys the pchild pool. - User cleanups registered in the pchild ap_context_t will be invoked at + User cleanups registered in the pchild ap_pool_t will be invoked at this point. (This can pose some complications, the user cleanups are asynchronous behaviour not unlike longjmp/signal... but if the admin is asking for a non-graceful shutdown, how much effort should @@ -103,7 +103,7 @@ /* run until a restart/shutdown is indicated, return 1 for shutdown 0 otherwise */ -API_EXPORT(int) ap_mpm_run(ap_context_t *pconf, ap_context_t *plog, server_rec *server_conf); +API_EXPORT(int) ap_mpm_run(ap_pool_t *pconf, ap_pool_t *plog, server_rec *server_conf); /* predicate indicating if a graceful stop has been requested ... used by the connection loop */ @@ -128,7 +128,7 @@ void ap_start_restart(int graceful); /* * ap_signal_parent() - used to send a signal to the parent process. */ -void ap_signal_parent(ap_context_t *p, const char* signal, const char* server_root); +void ap_signal_parent(ap_pool_t *p, const char* signal, const char* server_root); #ifdef HAS_OTHER_CHILD /* diff --git a/include/http_config.h b/include/http_config.h index 7be298079c..8d94afac88 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -156,8 +156,8 @@ typedef struct { configfile_t *config_file; /* Config file structure from pcfg_openfile() */ - ap_context_t *pool; /* Pool to allocate new storage in */ - ap_context_t *temp_pool; /* Pool for scratch memory; persists during + ap_pool_t *pool; /* Pool to allocate new storage in */ + ap_pool_t *temp_pool; /* Pool for scratch memory; persists during * configuration, but wiped before the first * request is served... */ @@ -211,11 +211,11 @@ typedef struct module_struct { * It's mainly important for the DSO facility * (see also mod_so). */ - void (*pre_config) (ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp); - void *(*create_dir_config) (ap_context_t *p, char *dir); - void *(*merge_dir_config) (ap_context_t *p, void *base_conf, void *new_conf); - void *(*create_server_config) (ap_context_t *p, server_rec *s); - void *(*merge_server_config) (ap_context_t *p, void *base_conf, void *new_conf); + void (*pre_config) (ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp); + void *(*create_dir_config) (ap_pool_t *p, char *dir); + void *(*merge_dir_config) (ap_pool_t *p, void *base_conf, void *new_conf); + void *(*create_server_config) (ap_pool_t *p, server_rec *s); + void *(*merge_server_config) (ap_pool_t *p, void *base_conf, void *new_conf); const command_rec *cmds; const handler_rec *handlers; @@ -290,7 +290,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, char *); * it relativizes it wrt server_root. */ -API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *fname); +API_EXPORT(const char *) ap_server_root_relative(ap_pool_t *p, const char *fname); /* Finally, the hook for dynamically loading modules in... */ @@ -329,38 +329,38 @@ extern API_VAR_EXPORT module **ap_loaded_modules; /* For mod_so.c... */ -void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m); +void ap_single_module_configure(ap_pool_t *p, server_rec *s, module *m); /* For http_main.c... */ void ap_setup_prelinked_modules(process_rec *process); void ap_show_directives(void); void ap_show_modules(void); -server_rec *ap_read_config(process_rec *process, ap_context_t *temp_pool, const char *config_name); -void ap_run_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp); -void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s); -void ap_child_init_hook(ap_context_t *pchild, server_rec *s); +server_rec *ap_read_config(process_rec *process, ap_pool_t *temp_pool, const char *config_name); +void ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s); +void ap_child_init_hook(ap_pool_t *pchild, server_rec *s); + void ap_register_hooks(module *m); void ap_hook_deregister_all(void); /* For http_request.c... */ -void *ap_create_request_config(ap_context_t *p); -CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p); -void *ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new); +void *ap_create_request_config(ap_pool_t *p); +CORE_EXPORT(void *) ap_create_per_dir_config(ap_pool_t *p); +void *ap_merge_per_dir_configs(ap_pool_t *p, void *base, void *new); /* For http_connection.c... */ -void *ap_create_conn_config(ap_context_t *p); +void *ap_create_conn_config(ap_pool_t *p); /* For http_core.c... (<Directory> command and virtual hosts) */ int ap_parse_htaccess(void **result, request_rec *r, int override, const char *path, const char *access_name); -CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname, +CORE_EXPORT(const char *) ap_init_virtual_host(ap_pool_t *p, const char *hostname, server_rec *main_server, server_rec **); -void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp); +void ap_process_resource_config(server_rec *s, const char *fname, ap_pool_t *p, ap_pool_t *ptemp); /* Module-method dispatchers, also for http_request.c */ @@ -380,10 +380,10 @@ CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, cons /* Hooks */ DECLARE_HOOK(int,header_parser,(request_rec *)) DECLARE_HOOK(void,post_config, - (ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s)) + (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s)) DECLARE_HOOK(void,open_logs, - (ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s)) -DECLARE_HOOK(void,child_init,(ap_context_t *pchild, server_rec *s)) + (ap_pool_t *pconf,ap_pool_t *plog,ap_pool_t *ptemp,server_rec *s)) +DECLARE_HOOK(void,child_init,(ap_pool_t *pchild, server_rec *s)) #ifdef __cplusplus } diff --git a/include/http_connection.h b/include/http_connection.h index 86c1ee2367..e4891f7360 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -63,10 +63,10 @@ extern "C" { #endif #ifdef CORE_PRIVATE -conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_connection(ap_pool_t *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, const struct sockaddr_in *saddr, long id); -conn_rec *ap_new_apr_connection(ap_context_t *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_apr_connection(ap_pool_t *p, server_rec *server, BUFF *inout, const ap_socket_t *conn_socket, long id); CORE_EXPORT(void) ap_process_connection(conn_rec *); int ap_process_http_connection(conn_rec *); diff --git a/include/http_core.h b/include/http_core.h index c55f0bc643..71ad9536f0 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -131,7 +131,7 @@ API_EXPORT(const char *) ap_get_remote_logname(request_rec *r); /* Used for constructing self-referencing URLs, and things like SERVER_PORT, * and SERVER_NAME. */ -API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri, request_rec *r); +API_EXPORT(char *) ap_construct_url(ap_pool_t *p, const char *uri, request_rec *r); API_EXPORT(const char *) ap_get_server_name(request_rec *r); API_EXPORT(unsigned) ap_get_server_port(const request_rec *r); API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r); @@ -295,7 +295,7 @@ typedef struct { } core_server_config; /* for http_config.c */ -void ap_core_reorder_directories(ap_context_t *, server_rec *); +void ap_core_reorder_directories(ap_pool_t *, server_rec *); /* for mod_perl */ CORE_EXPORT(void) ap_add_per_dir_conf (server_rec *s, void *dir_config); diff --git a/include/http_log.h b/include/http_log.h index ab29b62ab5..265563c0be 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -109,7 +109,7 @@ extern "C" { #define APLOG_MARK __FILE__,__LINE__ -void ap_open_logs (server_rec *, ap_context_t *p); +void ap_open_logs (server_rec *, ap_pool_t *p); /* The two primary logging functions, ap_log_error and ap_log_rerror, * use a printf style format string to build the log message. It is @@ -129,7 +129,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, __attribute__((format(printf,6,7))); API_EXPORT(void) ap_error_log2stderr (server_rec *); -void ap_log_pid (ap_context_t *p, const char *fname); +void ap_log_pid (ap_pool_t *p, const char *fname); /* These are for legacy code, new code should use ap_log_error, * or ap_log_rerror. */ @@ -142,7 +142,7 @@ API_EXPORT(void) ap_log_reason(const char *reason, const char *fname, request_rec *r); typedef struct piped_log { - ap_context_t *p; + ap_pool_t *p; ap_file_t *fds[2]; /* XXX - an #ifdef that needs to be eliminated from public view. Shouldn't * be hard */ @@ -152,7 +152,7 @@ typedef struct piped_log { #endif } piped_log; -API_EXPORT(piped_log *) ap_open_piped_log (ap_context_t *p, const char *program); +API_EXPORT(piped_log *) ap_open_piped_log (ap_pool_t *p, const char *program); API_EXPORT(void) ap_close_piped_log (piped_log *); #define ap_piped_log_read_fd(pl) ((pl)->fds[0]) #define ap_piped_log_write_fd(pl) ((pl)->fds[1]) diff --git a/include/http_request.h b/include/http_request.h index f492e66264..42b200db6a 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -82,7 +82,7 @@ extern "C" { * (e.g., for includes), a module may call for the request to be run * by calling run_sub_req. The space allocated to create sub_reqs can be * reclaimed by calling destroy_sub_req --- be sure to copy anything you care - * about which was allocated in its ap_context_t elsewhere before doing this. + * about which was allocated in its ap_pool_t elsewhere before doing this. */ API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file, diff --git a/include/http_vhost.h b/include/http_vhost.h index bdc581768d..8d13e49ceb 100644 --- a/include/http_vhost.h +++ b/include/http_vhost.h @@ -60,13 +60,13 @@ extern "C" { #endif /* called before any config is read */ -void ap_init_vhost_config(ap_context_t *p); +void ap_init_vhost_config(ap_pool_t *p); /* called after the config has been read */ -void ap_fini_vhost_config(ap_context_t *p, server_rec *main_server); +void ap_fini_vhost_config(ap_pool_t *p, server_rec *main_server); /* handle addresses in <VirtualHost> statement */ -const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s); +const char *ap_parse_vhost_addrs(ap_pool_t *p, const char *hostname, server_rec *s); /* handle NameVirtualHost directive */ const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg); diff --git a/include/httpd.h b/include/httpd.h index 349e39d73a..40895401bf 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -568,8 +568,8 @@ typedef struct request_rec request_rec; #include "util_uri.h" struct process_rec { - ap_context_t *pool; /* Global pool. Please try to cleared on _all_ exits */ - ap_context_t *pconf; /* aka configuration pool, cleared on restarts */ + ap_pool_t *pool; /* Global pool. Please try to cleared on _all_ exits */ + ap_pool_t *pconf; /* aka configuration pool, cleared on restarts */ int argc; const char **argv; const char *short_name; @@ -577,7 +577,7 @@ struct process_rec { struct request_rec { - ap_context_t *pool; + ap_pool_t *pool; conn_rec *connection; server_rec *server; @@ -737,7 +737,7 @@ struct request_rec { struct conn_rec { - ap_context_t *pool; + ap_pool_t *pool; server_rec *base_server; /* Physical vhost this conn come in on */ void *vhost_lookup_data; /* used by http_vhost.c */ @@ -889,58 +889,58 @@ struct server_rec { /* Time */ -API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype); -API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t t, const char *fmt, int gmt); +API_EXPORT(char *) ap_field_noparam(ap_pool_t *p, const char *intype); +API_EXPORT(char *) ap_ht_time(ap_pool_t *p, ap_time_t t, const char *fmt, int gmt); /* String handling. The *_nc variants allow you to use non-const char **s as arguments (unfortunately C won't automatically convert a char ** to a const char **) */ -API_EXPORT(char *) ap_getword(ap_context_t *p, const char **line, char stop); -API_EXPORT(char *) ap_getword_nc(ap_context_t *p, char **line, char stop); -API_EXPORT(char *) ap_getword_white(ap_context_t *p, const char **line); -API_EXPORT(char *) ap_getword_white_nc(ap_context_t *p, char **line); -API_EXPORT(char *) ap_getword_nulls(ap_context_t *p, const char **line, char stop); -API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *p, char **line, char stop); -API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line); -API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line); -API_EXPORT(char *) ap_resolve_env(ap_context_t *p, const char * word); +API_EXPORT(char *) ap_getword(ap_pool_t *p, const char **line, char stop); +API_EXPORT(char *) ap_getword_nc(ap_pool_t *p, char **line, char stop); +API_EXPORT(char *) ap_getword_white(ap_pool_t *p, const char **line); +API_EXPORT(char *) ap_getword_white_nc(ap_pool_t *p, char **line); +API_EXPORT(char *) ap_getword_nulls(ap_pool_t *p, const char **line, char stop); +API_EXPORT(char *) ap_getword_nulls_nc(ap_pool_t *p, char **line, char stop); +API_EXPORT(char *) ap_getword_conf(ap_pool_t *p, const char **line); +API_EXPORT(char *) ap_getword_conf_nc(ap_pool_t *p, char **line); +API_EXPORT(char *) ap_resolve_env(ap_pool_t *p, const char * word); API_EXPORT(const char *) ap_size_list_item(const char **field, int *len); -API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field); -API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok); +API_EXPORT(char *) ap_get_list_item(ap_pool_t *p, const char **field); +API_EXPORT(int) ap_find_list_item(ap_pool_t *p, const char *line, const char *tok); -API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white); -API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok); -API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok); +API_EXPORT(char *) ap_get_token(ap_pool_t *p, const char **accept_line, int accept_white); +API_EXPORT(int) ap_find_token(ap_pool_t *p, const char *line, const char *tok); +API_EXPORT(int) ap_find_last_token(ap_pool_t *p, const char *line, const char *tok); API_EXPORT(int) ap_is_url(const char *u); API_EXPORT(int) ap_unescape_url(char *url); API_EXPORT(void) ap_no2slash(char *name); API_EXPORT(void) ap_getparents(char *name); -API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *s); -API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial); +API_EXPORT(char *) ap_escape_path_segment(ap_pool_t *p, const char *s); +API_EXPORT(char *) ap_os_escape_path(ap_pool_t *p, const char *path, int partial); #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1) -API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s); -API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname, +API_EXPORT(char *) ap_escape_html(ap_pool_t *p, const char *s); +API_EXPORT(char *) ap_construct_server(ap_pool_t *p, const char *hostname, unsigned port, const request_rec *r); -API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *s); +API_EXPORT(char *) ap_escape_shell_cmd(ap_pool_t *p, const char *s); API_EXPORT(int) ap_count_dirs(const char *path); API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n); -API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s); +API_EXPORT(char *) ap_make_dirstr_parent(ap_pool_t *p, const char *s); /* deprecated. The previous two routines are preferred. */ -API_EXPORT(char *) ap_make_dirstr(ap_context_t *a, const char *s, int n); -API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *dir, const char *f); +API_EXPORT(char *) ap_make_dirstr(ap_pool_t *a, const char *s, int n); +API_EXPORT(char *) ap_make_full_path(ap_pool_t *a, const char *dir, const char *f); API_EXPORT(int) ap_is_matchexp(const char *str); API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp); API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp); API_EXPORT(char *) ap_strcasestr(const char *s1, const char *s2); -API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded); -API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string); -API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded); -API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string); +API_EXPORT(char *) ap_pbase64decode(ap_pool_t *p, const char *bufcoded); +API_EXPORT(char *) ap_pbase64encode(ap_pool_t *p, char *string); +API_EXPORT(char *) ap_uudecode(ap_pool_t *p, const char *bufcoded); +API_EXPORT(char *) ap_uuencode(ap_pool_t *p, char *string); /* Regexes */ #if defined(AP_USE_HSREGEX) || defined(WIN32) @@ -949,14 +949,14 @@ API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string); #include <regex.h> #endif -API_EXPORT(regex_t *) ap_pregcomp(ap_context_t *p, const char *pattern, +API_EXPORT(regex_t *) ap_pregcomp(ap_pool_t *p, const char *pattern, int cflags); -API_EXPORT(void) ap_pregfree(ap_context_t *p, regex_t *reg); +API_EXPORT(void) ap_pregfree(ap_pool_t *p, regex_t *reg); API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size); -API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source, +API_EXPORT(char *) ap_pregsub(ap_pool_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]); API_EXPORT(void) ap_content_type_tolower(char *); @@ -964,7 +964,7 @@ API_EXPORT(void) ap_str_tolower(char *); API_EXPORT(int) ap_ind(const char *, char); /* Sigh... */ API_EXPORT(int) ap_rind(const char *, char); -API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring); +API_EXPORT(char *) ap_escape_quotes (ap_pool_t *p, const char *instring); /* Common structure for reading of config files / passwd files etc. */ typedef struct { @@ -977,10 +977,10 @@ typedef struct { } configfile_t; /* Open a configfile_t as FILE, return open configfile_t struct pointer */ -API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **, ap_context_t *p, const char *name); +API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **, ap_pool_t *p, const char *name); /* Allocate a configfile_t handle with user defined functions and params */ -API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr, +API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_pool_t *p, const char *descr, void *param, int(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), @@ -1005,14 +1005,14 @@ API_EXPORT(int) ap_get_max_daemons(void); API_EXPORT(const server_rec *) ap_get_server_conf(void); #ifdef _OSD_POSIX -extern const char *os_set_account(ap_context_t *p, const char *account); +extern const char *os_set_account(ap_pool_t *p, const char *account); extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process); #endif /* _OSD_POSIX */ -char *ap_get_local_host(ap_context_t *); +char *ap_get_local_host(ap_pool_t *); unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port); -API_EXPORT(char *) ap_escape_quotes(ap_context_t *p, const char *instr); +API_EXPORT(char *) ap_escape_quotes(ap_pool_t *p, const char *instr); /* * Redefine assert() to something more useful for an Apache... diff --git a/include/mpm_status.h b/include/mpm_status.h index 28674445c8..901fe9e28a 100644 --- a/include/mpm_status.h +++ b/include/mpm_status.h @@ -81,7 +81,7 @@ API_EXPORT(const char *) ap_get_connection_status(long conn_id, const char *key) * Get an array of current connection IDs. * */ -API_EXPORT(ap_array_header_t *) ap_get_connections(ap_context_t *p); +API_EXPORT(ap_array_header_t *) ap_get_connections(ap_pool_t *p); /** * Get an array of keys from a given connection. @@ -89,7 +89,7 @@ API_EXPORT(ap_array_header_t *) ap_get_connections(ap_context_t *p); * conn_id = Connection ID * */ -API_EXPORT(ap_array_header_t *) ap_get_connection_keys(ap_context_t *p, +API_EXPORT(ap_array_header_t *) ap_get_connection_keys(ap_pool_t *p, long conn_id); /** @@ -122,7 +122,7 @@ API_EXPORT(void) ap_reset_connection_status(long conn_id); * p = context, generally of the request * */ -API_EXPORT(ap_array_header_t *) ap_get_status_table(ap_context_t *p); +API_EXPORT(ap_array_header_t *) ap_get_status_table(ap_pool_t *p); #endif /* APACHE_SERVER_STATS_H */ diff --git a/include/util_md5.h b/include/util_md5.h index ccf3f3cf3e..9f94e265a5 100644 --- a/include/util_md5.h +++ b/include/util_md5.h @@ -65,10 +65,10 @@ extern "C" { #include "ap_md5.h" -API_EXPORT(char *) ap_md5(ap_context_t *a, const unsigned char *string); -API_EXPORT(char *) ap_md5_binary(ap_context_t *a, const unsigned char *buf, int len); -API_EXPORT(char *) ap_md5contextTo64(ap_context_t *p, AP_MD5_CTX * context); -API_EXPORT(char *) ap_md5digest(ap_context_t *p, ap_file_t *infile); +API_EXPORT(char *) ap_md5(ap_pool_t *a, const unsigned char *string); +API_EXPORT(char *) ap_md5_binary(ap_pool_t *a, const unsigned char *buf, int len); +API_EXPORT(char *) ap_md5contextTo64(ap_pool_t *p, AP_MD5_CTX * context); +API_EXPORT(char *) ap_md5digest(ap_pool_t *p, ap_file_t *infile); #ifdef __cplusplus } diff --git a/include/util_script.h b/include/util_script.h index 959506bee2..b723fe3068 100644 --- a/include/util_script.h +++ b/include/util_script.h @@ -71,7 +71,7 @@ extern "C" { #endif #endif -API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t); +API_EXPORT(char **) ap_create_environment(ap_pool_t *p, ap_table_t *t); API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info); API_EXPORT(void) ap_add_cgi_vars(request_rec *r); API_EXPORT(void) ap_add_common_vars(request_rec *r); diff --git a/include/util_uri.h b/include/util_uri.h index 3a87a63b94..02645f20dc 100644 --- a/include/util_uri.h +++ b/include/util_uri.h @@ -114,12 +114,12 @@ typedef struct { /* util_uri.c */ API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str); API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r); -API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp); -API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname); -API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr, +API_EXPORT(struct hostent *) ap_pduphostent(ap_pool_t *p, const struct hostent *hp); +API_EXPORT(struct hostent *) ap_pgethostbyname(ap_pool_t *p, const char *hostname); +API_EXPORT(char *) ap_unparse_uri_components(ap_pool_t *p, const uri_components *uptr, unsigned flags); -API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr); -API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr); +API_EXPORT(int) ap_parse_uri_components(ap_pool_t *p, const char *uri, uri_components *uptr); +API_EXPORT(int) ap_parse_hostinfo_components(ap_pool_t *p, const char *hostinfo, uri_components *uptr); /* called by the core in main() */ extern void ap_util_uri_init(void); diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c index 636e3c6191..afa259cf68 100644 --- a/modules/aaa/mod_access.c +++ b/modules/aaa/mod_access.c @@ -107,7 +107,7 @@ typedef struct { module MODULE_VAR_EXPORT access_module; -static void *create_access_dir_config(ap_context_t *p, char *dummy) +static void *create_access_dir_config(ap_pool_t *p, char *dummy) { access_dir_conf *conf = (access_dir_conf *) ap_pcalloc(p, sizeof(access_dir_conf)); diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index cc47a6b584..c985f52149 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -85,7 +85,7 @@ typedef struct auth_config_struct { int auth_authoritative; } auth_config_rec; -static void *create_auth_dir_config(ap_context_t *p, char *d) +static void *create_auth_dir_config(ap_pool_t *p, char *d) { auth_config_rec *sec = (auth_config_rec *) ap_pcalloc(p, sizeof(auth_config_rec)); @@ -147,11 +147,11 @@ static char *get_pw(request_rec *r, char *user, char *auth_pwfile) return NULL; } -static ap_table_t *groups_for_user(ap_context_t *p, char *user, char *grpfile) +static ap_table_t *groups_for_user(ap_pool_t *p, char *user, char *grpfile) { configfile_t *f; ap_table_t *grps = ap_make_table(p, 15); - ap_context_t *sp; + ap_pool_t *sp; char l[MAX_STRING_LEN]; const char *group_name, *ll, *w; ap_status_t status; @@ -162,7 +162,7 @@ static ap_table_t *groups_for_user(ap_context_t *p, char *user, char *grpfile) return NULL; } - ap_create_context(&sp, p); + ap_create_pool(&sp, p); while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) { if ((l[0] == '#') || (!l[0])) diff --git a/modules/aaa/mod_auth_anon.c b/modules/aaa/mod_auth_anon.c index 9c74d4baab..44cea72930 100644 --- a/modules/aaa/mod_auth_anon.c +++ b/modules/aaa/mod_auth_anon.c @@ -117,7 +117,7 @@ typedef struct { } anon_auth_config_rec; -static void *create_anon_auth_dir_config(ap_context_t *p, char *d) +static void *create_anon_auth_dir_config(ap_pool_t *p, char *d) { anon_auth_config_rec *sec = (anon_auth_config_rec *) ap_pcalloc(p, sizeof(anon_auth_config_rec)); diff --git a/modules/aaa/mod_auth_db.c b/modules/aaa/mod_auth_db.c index 7ed4876868..862e3d95df 100644 --- a/modules/aaa/mod_auth_db.c +++ b/modules/aaa/mod_auth_db.c @@ -118,7 +118,7 @@ typedef struct { int auth_dbauthoritative; } db_auth_config_rec; -static void *create_db_auth_dir_config(ap_context_t *p, char *d) +static void *create_db_auth_dir_config(ap_pool_t *p, char *d) { db_auth_config_rec *sec = (db_auth_config_rec *) ap_pcalloc(p, sizeof(db_auth_config_rec)); diff --git a/modules/aaa/mod_auth_dbm.c b/modules/aaa/mod_auth_dbm.c index 011bdabd8f..7372fdc322 100644 --- a/modules/aaa/mod_auth_dbm.c +++ b/modules/aaa/mod_auth_dbm.c @@ -104,7 +104,7 @@ typedef struct { } dbm_auth_config_rec; -static void *create_dbm_auth_dir_config(ap_context_t *p, char *d) +static void *create_dbm_auth_dir_config(ap_pool_t *p, char *d) { dbm_auth_config_rec *sec = (dbm_auth_config_rec *) ap_pcalloc(p, sizeof(dbm_auth_config_rec)); diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index 1f4a86e790..c25a1de612 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -434,8 +434,8 @@ failed: } #endif /* HAVE_SHMEM_MM */ -static void initialize_module(ap_context_t *p, ap_context_t *plog, - ap_context_t *ptemp, server_rec *s) +static void initialize_module(ap_pool_t *p, ap_pool_t *plog, + ap_pool_t *ptemp, server_rec *s) { /* keep from doing the init more than once at startup, and delay * the init until the second round @@ -468,7 +468,7 @@ static void initialize_module(ap_context_t *p, ap_context_t *plog, * configuration code */ -static void *create_digest_dir_config(ap_context_t *p, char *dir) +static void *create_digest_dir_config(ap_pool_t *p, char *dir) { digest_config_rec *conf; @@ -999,7 +999,7 @@ static void gen_nonce_hash(char *hash, const char *timestr, const char *opaque, /* The nonce has the format b64(time)+hash . */ -static const char *gen_nonce(ap_context_t *p, time_t now, const char *opaque, +static const char *gen_nonce(ap_pool_t *p, time_t now, const char *opaque, const server_rec *server, const digest_config_rec *conf) { @@ -1128,7 +1128,7 @@ static void clear_session(const digest_header_rec *resp) * Authorization challenge generation code (for WWW-Authenticate) */ -static const char *guess_domain(ap_context_t *p, const char *uri, +static const char *guess_domain(ap_pool_t *p, const char *uri, const char *filename, const char *dir) { size_t u_len = strlen(uri), f_len = strlen(filename), d_len = strlen(dir); @@ -1193,7 +1193,7 @@ static const char *guess_domain(ap_context_t *p, const char *uri, } -static const char *ltox(ap_context_t *p, unsigned long num) +static const char *ltox(ap_pool_t *p, unsigned long num) { if (num != 0) return ap_psprintf(p, "%lx", num); @@ -1675,7 +1675,7 @@ static ap_table_t *groups_for_user(request_rec *r, const char *user, { configfile_t *f; ap_table_t *grps = ap_make_table(r->pool, 15); - ap_context_t *sp; + ap_pool_t *sp; char l[MAX_STRING_LEN]; const char *group_name, *ll, *w; ap_status_t sts; @@ -1686,7 +1686,7 @@ static ap_table_t *groups_for_user(request_rec *r, const char *user, return NULL; } - if (ap_create_context(&sp, r->pool) != APR_SUCCESS) + if (ap_create_pool(&sp, r->pool) != APR_SUCCESS) return NULL; while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) { diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index dcf722baaa..57b9e34280 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -69,7 +69,7 @@ typedef struct int bEnabled; } EchoConfig; -static void *create_echo_server_config(ap_context_t *p,server_rec *s) +static void *create_echo_server_config(ap_pool_t *p,server_rec *s) { EchoConfig *pConfig=ap_pcalloc(p,sizeof *pConfig); diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c index cf41e23b9d..8d2e3244b2 100644 --- a/modules/experimental/mod_example.c +++ b/modules/experimental/mod_example.c @@ -126,8 +126,8 @@ static ap_table_t *static_calls_made = NULL; * freed each time we modify the trace. That way previous layers of trace * data don't get lost. */ -static ap_context_t *example_pool = NULL; -static ap_context_t *example_subpool = NULL; +static ap_pool_t *example_pool = NULL; +static ap_pool_t *example_subpool = NULL; /* * Declare ourselves so the configuration routines can find and know us. @@ -295,7 +295,7 @@ static void setup_module_cells() * If we haven't already allocated our module-private pool, do so now. */ if (example_pool == NULL) { - ap_create_context(&example_pool, NULL); + ap_create_pool(&example_pool, NULL); }; /* * Likewise for the ap_table_t of routine/environment pairs we visit outside of @@ -315,7 +315,7 @@ static void setup_module_cells() * The list can be displayed by the example_handler() routine. * * If the call occurs within a request context (i.e., we're passed a request - * record), we put the trace into the request ap_context_t and attach it to the + * record), we put the trace into the request ap_pool_t and attach it to the * request via the notes mechanism. Otherwise, the trace gets added * to the static (non-request-specific) list. * @@ -333,7 +333,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig, const char *sofar; char *addon; char *where; - ap_context_t *p; + ap_pool_t *p; const char *trace_copy; /* @@ -360,7 +360,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig, * Make a new sub-pool and copy any existing trace to it. Point the * trace cell at the copied value. */ - ap_create_context(&p, example_pool); + ap_create_pool(&p, example_pool); if (trace != NULL) { trace = ap_pstrdup(p, trace); } @@ -627,8 +627,8 @@ static int example_handler(request_rec *r) /* * All our module initialiser does is add its trace to the log. */ -static void example_init(ap_context_t *p, ap_context_t *ptemp, - ap_context_t *plog, server_rec *s) +static void example_init(ap_pool_t *p, ap_pool_t *ptemp, + ap_pool_t *plog, server_rec *s) { char *note; @@ -659,7 +659,7 @@ static void example_init(ap_context_t *p, ap_context_t *ptemp, /* * All our process initialiser does is add its trace to the log. */ -static void example_child_init(ap_context_t *p, server_rec *s) +static void example_child_init(ap_pool_t *p, server_rec *s) { char *note; @@ -690,7 +690,7 @@ static void example_child_init(ap_context_t *p, server_rec *s) /* * All our process-death routine does is add its trace to the log. */ -static void example_child_exit(server_rec *s, ap_context_t *p) +static void example_child_exit(server_rec *s, ap_pool_t *p) { char *note; @@ -717,7 +717,7 @@ static void example_child_exit(server_rec *s, ap_context_t *p) * The return value is a pointer to the created module-specific * structure. */ -static void *example_create_dir_config(ap_context_t *p, char *dirspec) +static void *example_create_dir_config(ap_pool_t *p, char *dirspec) { excfg *cfg; @@ -758,7 +758,7 @@ static void *example_create_dir_config(ap_context_t *p, char *dirspec) * The return value is a pointer to the created module-specific structure * containing the merged values. */ -static void *example_merge_dir_config(ap_context_t *p, void *parent_conf, +static void *example_merge_dir_config(ap_pool_t *p, void *parent_conf, void *newloc_conf) { @@ -803,7 +803,7 @@ static void *example_merge_dir_config(ap_context_t *p, void *parent_conf, * The return value is a pointer to the created module-specific * structure. */ -static void *example_create_server_config(ap_context_t *p, server_rec *s) +static void *example_create_server_config(ap_pool_t *p, server_rec *s) { excfg *cfg; @@ -839,7 +839,7 @@ static void *example_create_server_config(ap_context_t *p, server_rec *s) * The return value is a pointer to the created module-specific structure * containing the merged values. */ -static void *example_merge_server_config(ap_context_t *p, void *server1_conf, +static void *example_merge_server_config(ap_pool_t *p, void *server1_conf, void *server2_conf) { diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index cc334be492..b5e212ca12 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -363,7 +363,7 @@ otilde\365oslash\370ugrave\371uacute\372yacute\375" /* 6 */ * the tag value is html decoded if dodecode is non-zero */ -static char *get_tag(ap_context_t *p, ap_file_t *in, char *tag, int tagbuf_len, int dodecode) +static char *get_tag(ap_pool_t *p, ap_file_t *in, char *tag, int tagbuf_len, int dodecode) { char *t = tag, *tag_val, c, term; @@ -449,7 +449,7 @@ static char *get_tag(ap_context_t *p, ap_file_t *in, char *tag, int tagbuf_len, return ap_pstrdup(p, tag_val); } -static int get_directive(ap_file_t *in, char *dest, size_t len, ap_context_t *p) +static int get_directive(ap_file_t *in, char *dest, size_t len, ap_pool_t *p) { char *d = dest; char c; @@ -779,7 +779,7 @@ typedef struct { -static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_context_t *p) +static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_pool_t *p) { int numwords, x, idx; char *w; @@ -1413,14 +1413,14 @@ static int parse_expr(request_rec *r, const char *expr, const char *error) } *root, *current, *new; const char *parse; char buffer[MAX_STRING_LEN]; - ap_context_t *expr_pool; + ap_pool_t *expr_pool; int retval = 0; if ((parse = expr) == (char *) NULL) { return (0); } root = current = (struct parse_node *) NULL; - if (ap_create_context(&expr_pool, r->pool) != APR_SUCCESS) + if (ap_create_pool(&expr_pool, r->pool) != APR_SUCCESS) return 0; /* Create Parse Tree */ @@ -2338,7 +2338,7 @@ enum xbithack { #define DEFAULT_XBITHACK xbithack_off #endif -static void *create_includes_dir_config(ap_context_t *p, char *dummy) +static void *create_includes_dir_config(ap_pool_t *p, char *dummy) { enum xbithack *result = (enum xbithack *) ap_palloc(p, sizeof(enum xbithack)); *result = DEFAULT_XBITHACK; diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 579d7e1d23..cb5c24fa50 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -568,7 +568,7 @@ static const command_rec autoindex_cmds[] = {NULL} }; -static void *create_autoindex_config(ap_context_t *p, char *dummy) +static void *create_autoindex_config(ap_pool_t *p, char *dummy) { autoindex_config_rec *new = (autoindex_config_rec *) ap_pcalloc(p, sizeof(autoindex_config_rec)); @@ -591,7 +591,7 @@ static void *create_autoindex_config(ap_context_t *p, char *dummy) return (void *) new; } -static void *merge_autoindex_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_autoindex_configs(ap_pool_t *p, void *basev, void *addv) { autoindex_config_rec *new; autoindex_config_rec *base = (autoindex_config_rec *) basev; @@ -1283,12 +1283,12 @@ static void output_directories(struct ent **ar, int n, char *name = r->uri; char *tp; int static_columns = (autoindex_opts & SUPPRESS_COLSORT); - ap_context_t *scratch; + ap_pool_t *scratch; int name_width; char *name_scratch; char *pad_scratch; - ap_create_context(&scratch, r->pool); + ap_create_pool(&scratch, r->pool); if (name[0] == '\0') { name = "/"; } diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index feee4126bb..57bc4fef68 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -111,7 +111,7 @@ typedef struct { int bufbytes; } cgi_server_conf; -static void *create_cgi_config(ap_context_t *p, server_rec *s) +static void *create_cgi_config(ap_pool_t *p, server_rec *s) { cgi_server_conf *c = (cgi_server_conf *) ap_pcalloc(p, sizeof(cgi_server_conf)); @@ -123,7 +123,7 @@ static void *create_cgi_config(ap_context_t *p, server_rec *s) return c; } -static void *merge_cgi_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_cgi_config(ap_pool_t *p, void *basev, void *overridesv) { cgi_server_conf *base = (cgi_server_conf *) basev, *overrides = (cgi_server_conf *) overridesv; @@ -291,7 +291,7 @@ static int log_script(request_rec *r, cgi_server_conf * conf, int ret, return ret; } static ap_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **script_err, - char *command, char *const argv[], request_rec *r, ap_context_t *p) + char *command, char *const argv[], request_rec *r, ap_pool_t *p) { char **env; ap_procattr_t *procattr; @@ -381,7 +381,7 @@ static ap_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **scr ap_unblock_alarms(); return (rc); } -static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_context_t *p) +static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_pool_t *p) { int numwords, x, idx; char *w; @@ -416,7 +416,7 @@ static ap_status_t build_argv_list(char ***argv, request_rec *r, ap_context_t *p return APR_SUCCESS; } -static ap_status_t build_command_line(char **c, request_rec *r, ap_context_t *p) +static ap_status_t build_command_line(char **c, request_rec *r, ap_pool_t *p) { #ifdef WIN32 char *quoted_filename = NULL; @@ -461,7 +461,7 @@ static int cgi_handler(request_rec *r) char argsbuffer[HUGE_STRING_LEN]; int is_included = !strcmp(r->protocol, "INCLUDED"); void *sconf = r->server->module_config; - ap_context_t *p; + ap_pool_t *p; cgi_server_conf *conf = (cgi_server_conf *) ap_get_module_config(sconf, &cgi_module); diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 7f78ebc1b3..ffd08003d7 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -104,10 +104,10 @@ struct sockaddr_un { module MODULE_VAR_EXPORT cgid_module; -static void cgid_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *main_server); +static void cgid_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server); static int once_through = 0; -static ap_context_t *pcgi; +static ap_pool_t *pcgi; /* KLUDGE --- for back-combatibility, we don't have to check Execcgid * in ScriptAliased directories, which means we need to know if this @@ -150,7 +150,7 @@ typedef struct { * are handled in create_argv. * */ -static char **create_argv(ap_context_t *p, char *path, char *user, char *group, +static char **create_argv(ap_pool_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; @@ -484,10 +484,10 @@ static int cgid_server_child(int sd) char *argv0; char *filename; char **env; - ap_context_t *p; + ap_pool_t *p; request_rec *r; - ap_create_context(&p, pcgi); + ap_create_pool(&p, pcgi); r = ap_pcalloc(p, sizeof(request_rec)); r->pool = p; dup2(sd, STDIN_FILENO); @@ -563,7 +563,7 @@ static int cgid_server(void *data) return -1; } -static void cgid_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *main_server) +static void cgid_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server) { int pid; int tempfd; @@ -572,7 +572,7 @@ static void cgid_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, main_server->module_config, &cgid_module); if (once_through > 0) { - ap_create_context(&pcgi, p); + ap_create_pool(&pcgi, p); tempfd = creat(sconf->sockname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); close(tempfd); @@ -591,7 +591,7 @@ static void cgid_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, else once_through++; } -static void *create_cgid_config(ap_context_t *p, server_rec *s) +static void *create_cgid_config(ap_pool_t *p, server_rec *s) { cgid_server_conf *c = (cgid_server_conf *) ap_pcalloc(p, sizeof(cgid_server_conf)); @@ -604,7 +604,7 @@ static void *create_cgid_config(ap_context_t *p, server_rec *s) return c; } -static void *merge_cgid_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_cgid_config(ap_pool_t *p, void *basev, void *overridesv) { cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv; diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c index 39793f82e6..c5dda74bbc 100644 --- a/modules/generators/mod_info.c +++ b/modules/generators/mod_info.c @@ -106,7 +106,7 @@ typedef struct info_cfg_lines { module MODULE_VAR_EXPORT info_module; extern module *top_module; -static void *create_info_config(ap_context_t *p, server_rec *s) +static void *create_info_config(ap_pool_t *p, server_rec *s) { info_svr_conf *conf = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf)); @@ -114,7 +114,7 @@ static void *create_info_config(ap_context_t *p, server_rec *s) return conf; } -static void *merge_info_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_info_config(ap_pool_t *p, void *basev, void *overridesv) { info_svr_conf *new = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf)); info_svr_conf *base = (info_svr_conf *) basev; @@ -162,7 +162,7 @@ static char *mod_info_html_cmd_string(const char *string, char *buf, size_t buf_ return (buf); } -static info_cfg_lines *mod_info_load_config(ap_context_t *p, const char *filename, +static info_cfg_lines *mod_info_load_config(ap_pool_t *p, const char *filename, request_rec *r) { char s[MAX_STRING_LEN]; diff --git a/modules/http/http_core.c b/modules/http/http_core.c index b5e460214c..b444edee16 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -110,7 +110,7 @@ * the http_conf_globals. */ -static void *create_core_dir_config(ap_context_t *a, char *dir) +static void *create_core_dir_config(ap_pool_t *a, char *dir) { core_dir_config *conf; @@ -153,7 +153,7 @@ static void *create_core_dir_config(ap_context_t *a, char *dir) return (void *)conf; } -static void *merge_core_dir_configs(ap_context_t *a, void *basev, void *newv) +static void *merge_core_dir_configs(ap_pool_t *a, void *basev, void *newv) { core_dir_config *base = (core_dir_config *)basev; core_dir_config *new = (core_dir_config *)newv; @@ -272,7 +272,7 @@ static void *merge_core_dir_configs(ap_context_t *a, void *basev, void *newv) return (void*)conf; } -static void *create_core_server_config(ap_context_t *a, server_rec *s) +static void *create_core_server_config(ap_pool_t *a, server_rec *s) { core_server_config *conf; int is_virtual = s->is_virtual; @@ -289,7 +289,7 @@ static void *create_core_server_config(ap_context_t *a, server_rec *s) return (void *)conf; } -static void *merge_core_server_configs(ap_context_t *p, void *basev, void *virtv) +static void *merge_core_server_configs(ap_pool_t *p, void *basev, void *virtv) { core_server_config *base = (core_server_config *)basev; core_server_config *virt = (core_server_config *)virtv; @@ -397,7 +397,7 @@ static int reorder_sorter(const void *va, const void *vb) return a->orig_index - b->orig_index; } -void ap_core_reorder_directories(ap_context_t *p, server_rec *s) +void ap_core_reorder_directories(ap_pool_t *p, server_rec *s) { core_server_config *sconf; ap_array_header_t *sec; @@ -405,7 +405,7 @@ void ap_core_reorder_directories(ap_context_t *p, server_rec *s) int nelts; void **elts; int i; - ap_context_t *tmp; + ap_pool_t *tmp; sconf = ap_get_module_config(s->module_config, &core_module); sec = sconf->sec; @@ -413,7 +413,7 @@ void ap_core_reorder_directories(ap_context_t *p, server_rec *s) elts = (void **)sec->elts; /* we have to allocate tmp space to do a stable sort */ - ap_create_context(&tmp, p); + ap_create_pool(&tmp, p); sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin)); for (i = 0; i < nelts; ++i) { sortbin[i].orig_index = i; @@ -712,7 +712,7 @@ API_EXPORT(unsigned) ap_get_server_port(const request_rec *r) return port; } -API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri, +API_EXPORT(char *) ap_construct_url(ap_pool_t *p, const char *uri, request_rec *r) { unsigned port = ap_get_server_port(r); @@ -733,7 +733,7 @@ API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r) } #ifdef WIN32 -static char* get_interpreter_from_win32_registry(ap_context_t *p, const char* ext) +static char* get_interpreter_from_win32_registry(ap_pool_t *p, const char* ext) { char extension_path[] = "SOFTWARE\\Classes\\"; char executable_path[] = "\\SHELL\\OPEN\\COMMAND"; @@ -1723,7 +1723,7 @@ static const char *virtualhost_section(cmd_parms *cmd, void *dummy, char *arg) server_rec *main_server = cmd->server, *s; const char *errmsg; char *endp = strrchr(arg, '>'); - ap_context_t *p = cmd->pool; + ap_pool_t *p = cmd->pool; const char *old_end_token; const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); @@ -2646,7 +2646,7 @@ static const handler_rec core_handlers[] = { { NULL, NULL } }; -static void core_open_logs(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) +static void core_open_logs(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s) { ap_open_logs(s, pconf); } diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 155aedcc0f..fd1bd7e79c 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -963,11 +963,11 @@ static void get_mime_headers(request_rec *r) request_rec *ap_read_request(conn_rec *conn) { request_rec *r; - ap_context_t *p; + ap_pool_t *p; const char *expect; int access_status; - ap_create_context(&p, conn->pool); + ap_create_pool(&p, conn->pool); r = ap_pcalloc(p, sizeof(request_rec)); r->pool = p; r->connection = conn; diff --git a/modules/http/http_request.c b/modules/http/http_request.c index aa2df2627b..decbb80d65 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -732,10 +732,10 @@ static int file_walk(request_rec *r) static request_rec *make_sub_request(const request_rec *r) { - ap_context_t *rrp; + ap_pool_t *rrp; request_rec *rr; - ap_create_context(&rrp, r->pool); + ap_create_pool(&rrp, r->pool); rr = ap_pcalloc(rrp, sizeof(request_rec)); rr->pool = rrp; return rr; @@ -1259,7 +1259,7 @@ void ap_process_request(request_rec *r) ap_run_log_transaction(r); } -static ap_table_t *rename_original_env(ap_context_t *p, ap_table_t *t) +static ap_table_t *rename_original_env(ap_pool_t *p, ap_table_t *t) { ap_array_header_t *env_arr = ap_table_elts(t); ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts; diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 994d48366f..97102a69e5 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -128,7 +128,7 @@ static char tspecial[] = { module MODULE_VAR_EXPORT mime_module; -static void *create_mime_dir_config(ap_context_t *p, char *dummy) +static void *create_mime_dir_config(ap_pool_t *p, char *dummy) { mime_dir_config *new = (mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config)); @@ -147,7 +147,7 @@ static void *create_mime_dir_config(ap_context_t *p, char *dummy) return new; } -static void *merge_mime_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_mime_dir_configs(ap_pool_t *p, void *basev, void *addv) { mime_dir_config *base = (mime_dir_config *) basev; mime_dir_config *add = (mime_dir_config *) addv; @@ -298,7 +298,7 @@ static const command_rec mime_cmds[] = static ap_table_t *hash_buckets[MIME_HASHSIZE]; -static void mime_post_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) +static void mime_post_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s) { configfile_t *f; char l[MAX_STRING_LEN]; @@ -396,7 +396,7 @@ static content_type *analyze_ct(request_rec *r, char *s) char *attribute, *value; int quoted = 0; server_rec * ss = r->server; - ap_context_t * p = r->pool; + ap_pool_t * p = r->pool; content_type *ctp; param *pp, *npp; diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 85f51c9d1c..9dfe8d58dc 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -264,12 +264,12 @@ typedef struct { ap_array_header_t *conditions; } log_format_item; -static char *format_integer(ap_context_t *p, int i) +static char *format_integer(ap_pool_t *p, int i) { return ap_psprintf(p, "%d", i); } -static char *pfmt(ap_context_t *p, int i) +static char *pfmt(ap_pool_t *p, int i) { if (i <= 0) { return "-"; @@ -549,7 +549,7 @@ static struct log_item_list *find_log_func(char k) return NULL; } -static char *parse_log_misc_string(ap_context_t *p, log_format_item *it, +static char *parse_log_misc_string(ap_pool_t *p, log_format_item *it, const char **sa) { const char *s; @@ -607,7 +607,7 @@ static char *parse_log_misc_string(ap_context_t *p, log_format_item *it, return NULL; } -static char *parse_log_item(ap_context_t *p, log_format_item *it, const char **sa) +static char *parse_log_item(ap_pool_t *p, log_format_item *it, const char **sa) { const char *s = *sa; @@ -692,7 +692,7 @@ static char *parse_log_item(ap_context_t *p, log_format_item *it, const char **s return "Ran off end of LogFormat parsing args to some directive"; } -static ap_array_header_t *parse_log_string(ap_context_t *p, const char *s, const char **err) +static ap_array_header_t *parse_log_string(ap_pool_t *p, const char *s, const char **err) { ap_array_header_t *a = ap_make_array(p, 30, sizeof(log_format_item)); char *res; @@ -880,7 +880,7 @@ static int multi_log_transaction(request_rec *r) * Module glue... */ -static void *make_config_log_state(ap_context_t *p, server_rec *s) +static void *make_config_log_state(ap_pool_t *p, server_rec *s) { multi_log_state *mls; @@ -901,7 +901,7 @@ static void *make_config_log_state(ap_context_t *p, server_rec *s) * vhosts inherit any globally-defined format names. */ -static void *merge_config_log_state(ap_context_t *p, void *basev, void *addv) +static void *merge_config_log_state(ap_pool_t *p, void *basev, void *addv) { multi_log_state *base = (multi_log_state *) basev; multi_log_state *add = (multi_log_state *) addv; @@ -1003,7 +1003,7 @@ static const command_rec config_log_cmds[] = {NULL} }; -static config_log_state *open_config_log(server_rec *s, ap_context_t *p, +static config_log_state *open_config_log(server_rec *s, ap_pool_t *p, config_log_state *cls, ap_array_header_t *default_format) { @@ -1042,7 +1042,7 @@ static config_log_state *open_config_log(server_rec *s, ap_context_t *p, return cls; } -static config_log_state *open_multi_logs(server_rec *s, ap_context_t *p) +static config_log_state *open_multi_logs(server_rec *s, ap_pool_t *p) { int i; multi_log_state *mls = ap_get_module_config(s->module_config, @@ -1096,7 +1096,7 @@ static config_log_state *open_multi_logs(server_rec *s, ap_context_t *p) return NULL; } -static void init_config_log(ap_context_t *pc, ap_context_t *p, ap_context_t *pt, server_rec *s) +static void init_config_log(ap_pool_t *pc, ap_pool_t *p, ap_pool_t *pt, server_rec *s) { /* First, do "physical" server, which gets default log fd and format * for the virtual servers, if they don't override... diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c index 4960ab62bc..dd5c32e02c 100644 --- a/modules/mappers/mod_actions.c +++ b/modules/mappers/mod_actions.c @@ -95,7 +95,7 @@ typedef struct { module action_module; -static void *create_action_dir_config(ap_context_t *p, char *dummy) +static void *create_action_dir_config(ap_pool_t *p, char *dummy) { action_dir_config *new = (action_dir_config *) ap_palloc(p, sizeof(action_dir_config)); @@ -106,7 +106,7 @@ static void *create_action_dir_config(ap_context_t *p, char *dummy) return new; } -static void *merge_action_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_action_dir_configs(ap_pool_t *p, void *basev, void *addv) { action_dir_config *base = (action_dir_config *) basev; action_dir_config *add = (action_dir_config *) addv; diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index a972a2503d..af02eaaee3 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -88,7 +88,7 @@ typedef struct { module MODULE_VAR_EXPORT alias_module; -static void *create_alias_config(ap_context_t *p, server_rec *s) +static void *create_alias_config(ap_pool_t *p, server_rec *s) { alias_server_conf *a = (alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf)); @@ -98,7 +98,7 @@ static void *create_alias_config(ap_context_t *p, server_rec *s) return a; } -static void *create_alias_dir_config(ap_context_t *p, char *d) +static void *create_alias_dir_config(ap_pool_t *p, char *d) { alias_dir_conf *a = (alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf)); @@ -106,7 +106,7 @@ static void *create_alias_dir_config(ap_context_t *p, char *d) return a; } -static void *merge_alias_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_alias_config(ap_pool_t *p, void *basev, void *overridesv) { alias_server_conf *a = (alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf)); @@ -117,7 +117,7 @@ static void *merge_alias_config(ap_context_t *p, void *basev, void *overridesv) return a; } -static void *merge_alias_dir_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_alias_dir_config(ap_pool_t *p, void *basev, void *overridesv) { alias_dir_conf *a = (alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf)); diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 0dbed440ce..0b00fc3910 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -97,7 +97,7 @@ static const command_rec dir_cmds[] = {NULL} }; -static void *create_dir_config(ap_context_t *p, char *dummy) +static void *create_dir_config(ap_pool_t *p, char *dummy) { dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec)); @@ -106,7 +106,7 @@ static void *create_dir_config(ap_context_t *p, char *dummy) return (void *) new; } -static void *merge_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_dir_configs(ap_pool_t *p, void *basev, void *addv) { dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec)); dir_config_rec *base = (dir_config_rec *) basev; diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index 91b44a7911..673e495a88 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -126,7 +126,7 @@ typedef struct { char *imap_base; } imap_conf_rec; -static void *create_imap_dir_config(ap_context_t *p, char *dummy) +static void *create_imap_dir_config(ap_pool_t *p, char *dummy) { imap_conf_rec *icr = (imap_conf_rec *) ap_palloc(p, sizeof(imap_conf_rec)); @@ -138,7 +138,7 @@ static void *create_imap_dir_config(ap_context_t *p, char *dummy) return icr; } -static void *merge_imap_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_imap_dir_configs(ap_pool_t *p, void *basev, void *addv) { imap_conf_rec *new = (imap_conf_rec *) ap_pcalloc(p, sizeof(imap_conf_rec)); imap_conf_rec *base = (imap_conf_rec *) basev; diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 06b2c1a163..994df48c03 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -88,7 +88,7 @@ typedef struct { module MODULE_VAR_EXPORT negotiation_module; -static void *create_neg_dir_config(ap_context_t *p, char *dummy) +static void *create_neg_dir_config(ap_pool_t *p, char *dummy) { neg_dir_config *new = (neg_dir_config *) ap_palloc(p, sizeof(neg_dir_config)); @@ -96,7 +96,7 @@ static void *create_neg_dir_config(ap_context_t *p, char *dummy) return new; } -static void *merge_neg_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_neg_dir_configs(ap_pool_t *p, void *basev, void *addv) { neg_dir_config *base = (neg_dir_config *) basev; neg_dir_config *add = (neg_dir_config *) addv; @@ -217,7 +217,7 @@ typedef struct var_rec { */ typedef struct { - ap_context_t *pool; + ap_pool_t *pool; request_rec *r; char *dir_name; int accept_q; /* 1 if an Accept item has a q= param */ @@ -318,7 +318,7 @@ static void set_vlist_validator(request_rec *r, request_rec *vlistr) * enter the values we recognize into the argument accept_rec */ -static const char *get_entry(ap_context_t *p, accept_rec *result, +static const char *get_entry(ap_pool_t *p, accept_rec *result, const char *accept_line) { result->quality = 1.0f; @@ -425,7 +425,7 @@ static const char *get_entry(ap_context_t *p, accept_rec *result, * where charset is only valid in Accept. */ -static ap_array_header_t *do_header_line(ap_context_t *p, const char *accept_line) +static ap_array_header_t *do_header_line(ap_pool_t *p, const char *accept_line) { ap_array_header_t *accept_recs; @@ -447,7 +447,7 @@ static ap_array_header_t *do_header_line(ap_context_t *p, const char *accept_lin * return an array containing the languages of this variant */ -static ap_array_header_t *do_languages_line(ap_context_t *p, const char **lang_line) +static ap_array_header_t *do_languages_line(ap_pool_t *p, const char **lang_line) { ap_array_header_t *lang_recs = ap_make_array(p, 2, sizeof(char *)); diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 213af0d7c9..03a638320d 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -247,7 +247,7 @@ static ap_lock_t *rewrite_log_lock = NULL; ** */ -static void *config_server_create(ap_context_t *p, server_rec *s) +static void *config_server_create(ap_pool_t *p, server_rec *s) { rewrite_server_conf *a; @@ -266,7 +266,7 @@ static void *config_server_create(ap_context_t *p, server_rec *s) return (void *)a; } -static void *config_server_merge(ap_context_t *p, void *basev, void *overridesv) +static void *config_server_merge(ap_pool_t *p, void *basev, void *overridesv) { rewrite_server_conf *a, *base, *overrides; @@ -322,7 +322,7 @@ static void *config_server_merge(ap_context_t *p, void *basev, void *overridesv) ** */ -static void *config_perdir_create(ap_context_t *p, char *path) +static void *config_perdir_create(ap_pool_t *p, char *path) { rewrite_perdir_conf *a; @@ -350,7 +350,7 @@ static void *config_perdir_create(ap_context_t *p, char *path) return (void *)a; } -static void *config_perdir_merge(ap_context_t *p, void *basev, void *overridesv) +static void *config_perdir_merge(ap_pool_t *p, void *basev, void *overridesv) { rewrite_perdir_conf *a, *base, *overrides; @@ -425,7 +425,7 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd, return err; } -static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options, +static const char *cmd_rewriteoptions_setoption(ap_pool_t *p, int *options, char *name) { if (strcasecmp(name, "inherit") == 0) { @@ -644,7 +644,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf, return NULL; } -static const char *cmd_rewritecond_parseflagfield(ap_context_t *p, +static const char *cmd_rewritecond_parseflagfield(ap_pool_t *p, rewritecond_entry *cfg, char *str) { @@ -696,7 +696,7 @@ static const char *cmd_rewritecond_parseflagfield(ap_context_t *p, return NULL; } -static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg, +static const char *cmd_rewritecond_setflag(ap_pool_t *p, rewritecond_entry *cfg, char *key, char *val) { if ( strcasecmp(key, "nocase") == 0 @@ -800,7 +800,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf, return NULL; } -static const char *cmd_rewriterule_parseflagfield(ap_context_t *p, +static const char *cmd_rewriterule_parseflagfield(ap_pool_t *p, rewriterule_entry *cfg, char *str) { @@ -852,7 +852,7 @@ static const char *cmd_rewriterule_parseflagfield(ap_context_t *p, return NULL; } -static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg, +static const char *cmd_rewriterule_setflag(ap_pool_t *p, rewriterule_entry *cfg, char *key, char *val) { int status = 0; @@ -957,9 +957,9 @@ static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *c ** */ -static void init_module(ap_context_t *p, - ap_context_t *plog, - ap_context_t *ptemp, +static void init_module(ap_pool_t *p, + ap_pool_t *plog, + ap_pool_t *ptemp, server_rec *s) { /* check if proxy module is available */ @@ -995,7 +995,7 @@ static void init_module(ap_context_t *p, ** */ -static void init_child(ap_context_t *p, server_rec *s) +static void init_child(ap_pool_t *p, server_rec *s) { if (lockname != NULL && *(lockname) != '\0') @@ -2516,7 +2516,7 @@ static void fully_qualify_uri(request_rec *r) ** */ -static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf, +static void expand_backref_inbuffer(ap_pool_t *p, char *buf, int nbuf, backrefinfo *bri, char c) { register int i; @@ -3146,7 +3146,7 @@ static char *select_random_value_part(request_rec *r, char *value) */ -static void open_rewritelog(server_rec *s, ap_context_t *p) +static void open_rewritelog(server_rec *s, ap_pool_t *p) { rewrite_server_conf *conf; const char *fname; @@ -3306,7 +3306,7 @@ static char *current_logtime(request_rec *r) #define REWRITELOCK_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) -static void rewritelock_create(server_rec *s, ap_context_t *p) +static void rewritelock_create(server_rec *s, ap_pool_t *p) { ap_status_t rc; @@ -3353,7 +3353,7 @@ static ap_status_t rewritelock_remove(void *data) ** +-------------------------------------------------------+ */ -static void run_rewritemap_programs(server_rec *s, ap_context_t *p) +static void run_rewritemap_programs(server_rec *s, ap_pool_t *p) { rewrite_server_conf *conf; ap_file_t *fpin = NULL; @@ -3405,7 +3405,7 @@ static void run_rewritemap_programs(server_rec *s, ap_context_t *p) } /* child process code */ -static int rewritemap_program_child(ap_context_t *p, char *progname, +static int rewritemap_program_child(ap_pool_t *p, char *progname, ap_file_t **fpout, ap_file_t **fpin, ap_file_t **fperr) { @@ -3693,7 +3693,7 @@ static char *lookup_variable(request_rec *r, char *var) rsub = subrecfunc(r->filename, r); \ /* now recursively lookup the variable in the sub_req */ \ result = lookup_variable(rsub, var+5); \ - /* copy it up to our scope before we destroy sub_req's ap_context_t */ \ + /* copy it up to our scope before we destroy sub_req's ap_pool_t */ \ result = ap_pstrdup(r->pool, result); \ /* cleanup by destroying the subrequest */ \ ap_destroy_sub_req(rsub); \ @@ -3790,12 +3790,12 @@ static char *lookup_header(request_rec *r, const char *name) */ -static cache *init_cache(ap_context_t *p) +static cache *init_cache(ap_pool_t *p) { cache *c; c = (cache *)ap_palloc(p, sizeof(cache)); - if (ap_create_context(&c->pool, p) != APR_SUCCESS) + if (ap_create_pool(&c->pool, p) != APR_SUCCESS) return NULL; c->lists = ap_make_array(c->pool, 2, sizeof(cachelist)); return c; diff --git a/modules/mappers/mod_rewrite.h b/modules/mappers/mod_rewrite.h index 4b705ff02a..a09d51474c 100644 --- a/modules/mappers/mod_rewrite.h +++ b/modules/mappers/mod_rewrite.h @@ -309,7 +309,7 @@ typedef struct cachelist { } cachelist; typedef struct cache { - ap_context_t *pool; + ap_pool_t *pool; ap_array_header_t *lists; } cache; @@ -331,10 +331,10 @@ typedef struct backrefinfo { */ /* config structure handling */ -static void *config_server_create(ap_context_t *p, server_rec *s); -static void *config_server_merge (ap_context_t *p, void *basev, void *overridesv); -static void *config_perdir_create(ap_context_t *p, char *path); -static void *config_perdir_merge (ap_context_t *p, void *basev, void *overridesv); +static void *config_server_create(ap_pool_t *p, server_rec *s); +static void *config_server_merge (ap_pool_t *p, void *basev, void *overridesv); +static void *config_perdir_create(ap_pool_t *p, char *path); +static void *config_perdir_merge (ap_pool_t *p, void *basev, void *overridesv); /* config directive handling */ static const char *cmd_rewriteengine(cmd_parms *cmd, @@ -342,7 +342,7 @@ static const char *cmd_rewriteengine(cmd_parms *cmd, static const char *cmd_rewriteoptions(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *option); -static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options, +static const char *cmd_rewriteoptions_setoption(ap_pool_t *p, int *options, char *name); static const char *cmd_rewritelog (cmd_parms *cmd, void *dconf, char *a1); static const char *cmd_rewriteloglevel(cmd_parms *cmd, void *dconf, char *a1); @@ -353,25 +353,25 @@ static const char *cmd_rewritebase(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *a1); static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *str); -static const char *cmd_rewritecond_parseflagfield(ap_context_t *p, +static const char *cmd_rewritecond_parseflagfield(ap_pool_t *p, rewritecond_entry *new, char *str); -static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg, +static const char *cmd_rewritecond_setflag(ap_pool_t *p, rewritecond_entry *cfg, char *key, char *val); static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf, char *str); -static const char *cmd_rewriterule_parseflagfield(ap_context_t *p, +static const char *cmd_rewriterule_parseflagfield(ap_pool_t *p, rewriterule_entry *new, char *str); -static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg, +static const char *cmd_rewriterule_setflag(ap_pool_t *p, rewriterule_entry *cfg, char *key, char *val); /* initialisation */ -static void init_module(ap_context_t *p, - ap_context_t *plog, - ap_context_t *ptemp, +static void init_module(ap_pool_t *p, + ap_pool_t *plog, + ap_pool_t *ptemp, server_rec *s); -static void init_child(ap_context_t *p, server_rec *s); +static void init_child(ap_pool_t *p, server_rec *s); /* runtime hooks */ static int hook_uri2file (request_rec *r); @@ -392,7 +392,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, static void splitout_queryargs(request_rec *r, int qsappend); static void fully_qualify_uri(request_rec *r); static void reduce_uri(request_rec *r); -static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf, +static void expand_backref_inbuffer(ap_pool_t *p, char *buf, int nbuf, backrefinfo *bri, char c); static char *expand_tildepaths(request_rec *r, char *uri); static void expand_map_lookups(request_rec *r, char *uri, int uri_len); @@ -417,18 +417,18 @@ static void rewrite_rand_init(void); static int rewrite_rand(int l, int h); /* rewriting logfile support */ -static void open_rewritelog(server_rec *s, ap_context_t *p); +static void open_rewritelog(server_rec *s, ap_pool_t *p); static void rewritelog(request_rec *r, int level, const char *text, ...) __attribute__((format(printf,3,4))); static char *current_logtime(request_rec *r); /* rewriting lockfile support */ -static void rewritelock_create(server_rec *s, ap_context_t *p); +static void rewritelock_create(server_rec *s, ap_pool_t *p); static ap_status_t rewritelock_remove(void *data); /* program map support */ -static void run_rewritemap_programs(server_rec *s, ap_context_t *p); -static int rewritemap_program_child(ap_context_t *p, char *progname, +static void run_rewritemap_programs(server_rec *s, ap_pool_t *p); +static int rewritemap_program_child(ap_pool_t *p, char *progname, ap_file_t **fpout, ap_file_t **fpin, ap_file_t **fperr); @@ -439,7 +439,7 @@ static char *lookup_variable(request_rec *r, char *var); static char *lookup_header(request_rec *r, const char *name); /* caching functions */ -static cache *init_cache(ap_context_t *p); +static cache *init_cache(ap_pool_t *p); static char *get_cache_string(cache *c, char *res, int mode, time_t mtime, char *key); static void set_cache_string(cache *c, char *res, int mode, time_t mtime, diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index bf909abbbb..1a8d0c3e50 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -150,7 +150,7 @@ typedef struct so_server_conf { ap_array_header_t *loaded_modules; } so_server_conf; -static void *so_sconf_create(ap_context_t *p, server_rec *s) +static void *so_sconf_create(ap_pool_t *p, server_rec *s) { so_server_conf *soc; @@ -287,7 +287,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy, ap_add_loaded_module(modp); /* - * Register a cleanup in the config ap_context_t (normally pconf). When + * Register a cleanup in the config ap_pool_t (normally pconf). When * we do a restart (or shutdown) this cleanup will cause the * shared object to be unloaded. */ diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index c0a5de2c7b..03b6e675e6 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -102,7 +102,7 @@ typedef struct { * bother to have such a function. */ -static void *mkconfig(ap_context_t *p) +static void *mkconfig(ap_pool_t *p) { spconfig *cfg = ap_pcalloc(p, sizeof(spconfig)); @@ -114,7 +114,7 @@ static void *mkconfig(ap_context_t *p) * Respond to a callback to create configuration record for a server or * vhost environment. */ -static void *create_mconfig_for_server(ap_context_t *p, server_rec *s) +static void *create_mconfig_for_server(ap_pool_t *p, server_rec *s) { return mkconfig(p); } @@ -122,7 +122,7 @@ static void *create_mconfig_for_server(ap_context_t *p, server_rec *s) /* * Respond to a callback to create a config record for a specific directory. */ -static void *create_mconfig_for_directory(ap_context_t *p, char *dir) +static void *create_mconfig_for_directory(ap_pool_t *p, char *dir) { return mkconfig(p); } @@ -441,9 +441,9 @@ static int check_speling(request_rec *r) * returned. */ else { - ap_context_t *p; + ap_pool_t *p; ap_table_t *notes; - ap_context_t *sub_pool; + ap_pool_t *sub_pool; ap_array_header_t *t; ap_array_header_t *v; @@ -457,7 +457,7 @@ static int check_speling(request_rec *r) notes = r->main->notes; } - if (ap_create_context(&sub_pool, p) != APR_SUCCESS) + if (ap_create_pool(&sub_pool, p) != APR_SUCCESS) return DECLINED; t = ap_make_array(sub_pool, candidates->nelts * 8 + 8, diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index 710c35024b..2a087886fd 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -119,7 +119,7 @@ typedef struct userdir_config { * explicit) disablement, and the replacement string for all others. */ -static void *create_userdir_config(ap_context_t *p, server_rec *s) +static void *create_userdir_config(ap_pool_t *p, server_rec *s) { userdir_config * newcfg = (userdir_config *) ap_pcalloc(p, sizeof(userdir_config)); diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c index 8166c636e0..1eddd82ad2 100644 --- a/modules/mappers/mod_vhost_alias.c +++ b/modules/mappers/mod_vhost_alias.c @@ -102,7 +102,7 @@ typedef struct mva_sconf_t { mva_mode_e cgi_root_mode; } mva_sconf_t; -static void *mva_create_server_config(ap_context_t *p, server_rec *s) +static void *mva_create_server_config(ap_pool_t *p, server_rec *s) { mva_sconf_t *conf; @@ -114,7 +114,7 @@ static void *mva_create_server_config(ap_context_t *p, server_rec *s) return conf; } -static void *mva_merge_server_config(ap_context_t *p, void *parentv, void *childv) +static void *mva_merge_server_config(ap_pool_t *p, void *parentv, void *childv) { mva_sconf_t *parent = (mva_sconf_t *) parentv; mva_sconf_t *child = (mva_sconf_t *) childv; diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index b0919d3199..339937ed80 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -176,7 +176,7 @@ typedef struct { char *metafiles; } cern_meta_dir_config; -static void *create_cern_meta_dir_config(ap_context_t *p, char *dummy) +static void *create_cern_meta_dir_config(ap_pool_t *p, char *dummy) { cern_meta_dir_config *new = (cern_meta_dir_config *) ap_palloc(p, sizeof(cern_meta_dir_config)); @@ -188,7 +188,7 @@ static void *create_cern_meta_dir_config(ap_context_t *p, char *dummy) return new; } -static void *merge_cern_meta_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_cern_meta_dir_configs(ap_pool_t *p, void *basev, void *addv) { cern_meta_dir_config *base = (cern_meta_dir_config *) basev; cern_meta_dir_config *add = (cern_meta_dir_config *) addv; diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c index cc29e375bc..fa434ddaef 100644 --- a/modules/metadata/mod_env.c +++ b/modules/metadata/mod_env.c @@ -115,7 +115,7 @@ typedef struct { module MODULE_VAR_EXPORT env_module; -static void *create_env_dir_config(ap_context_t *p, char *dummy) +static void *create_env_dir_config(ap_pool_t *p, char *dummy) { env_dir_config_rec *new = (env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec)); @@ -125,7 +125,7 @@ static void *create_env_dir_config(ap_context_t *p, char *dummy) return (void *) new; } -static void *merge_env_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_env_dir_configs(ap_pool_t *p, void *basev, void *addv) { env_dir_config_rec *base = (env_dir_config_rec *) basev; env_dir_config_rec *add = (env_dir_config_rec *) addv; diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 8ac337b95a..49f8f0f530 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -218,7 +218,7 @@ typedef struct { module MODULE_VAR_EXPORT expires_module; -static void *create_dir_expires_config(ap_context_t *p, char *dummy) +static void *create_dir_expires_config(ap_pool_t *p, char *dummy) { expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config)); @@ -244,7 +244,7 @@ static const char *set_expiresactive(cmd_parms *cmd, expires_dir_config * dir_co * string. If we return NULL then real_code contains code converted * to the cnnnn format. */ -static char *check_code(ap_context_t *p, const char *code, char **real_code) +static char *check_code(ap_pool_t *p, const char *code, char **real_code) { char *word; char base = 'X'; @@ -381,7 +381,7 @@ static const command_rec expires_cmds[] = {NULL} }; -static void *merge_expires_dir_configs(ap_context_t *p, void *basev, void *addv) +static void *merge_expires_dir_configs(ap_pool_t *p, void *basev, void *addv) { expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config)); expires_dir_config *base = (expires_dir_config *) basev; diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index c0214ab989..d9b8057ae3 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -129,7 +129,7 @@ typedef struct { module MODULE_VAR_EXPORT headers_module; -static void *create_headers_config(ap_context_t *p, server_rec *s) +static void *create_headers_config(ap_pool_t *p, server_rec *s) { headers_conf *a = (headers_conf *) ap_pcalloc(p, sizeof(headers_conf)); @@ -138,12 +138,12 @@ static void *create_headers_config(ap_context_t *p, server_rec *s) return a; } -static void *create_headers_dir_config(ap_context_t *p, char *d) +static void *create_headers_dir_config(ap_pool_t *p, char *d) { return (headers_conf *) create_headers_config(p, NULL); } -static void *merge_headers_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_headers_config(ap_pool_t *p, void *basev, void *overridesv) { headers_conf *a = (headers_conf *) ap_pcalloc(p, sizeof(headers_conf)); diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index 3cccbcb881..fdcc0cede4 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -96,7 +96,7 @@ * modified from the free "file" command. * - all-in-one file for compilation convenience when moving from one * version of Apache to the next. - * - Memory allocation is done through the Apache API's ap_context_t structure. + * - Memory allocation is done through the Apache API's ap_pool_t structure. * - All functions have had necessary Apache API request or server * structures passed to them where necessary to call other Apache API * routines. (i.e. usually for logging, files, or memory allocation in @@ -251,7 +251,7 @@ static int zmagic(request_rec *, unsigned char *, int); static int getvalue(server_rec *, struct magic *, char **); static int hextoint(int); static char *getstr(server_rec *, char *, char *, int, int *); -static int parse(server_rec *, ap_context_t *p, char *, int); +static int parse(server_rec *, ap_pool_t *p, char *, int); static int match(request_rec *, unsigned char *, int); static int mget(request_rec *, union VALUETYPE *, unsigned char *, @@ -501,13 +501,13 @@ typedef struct { module mime_magic_module; -static void *create_magic_server_config(ap_context_t *p, server_rec *d) +static void *create_magic_server_config(ap_pool_t *p, server_rec *d) { /* allocate the config - use pcalloc because it needs to be zeroed */ return ap_pcalloc(p, sizeof(magic_server_config_rec)); } -static void *merge_magic_server_config(ap_context_t *p, void *basev, void *addv) +static void *merge_magic_server_config(ap_pool_t *p, void *basev, void *addv) { magic_server_config_rec *base = (magic_server_config_rec *) basev; magic_server_config_rec *add = (magic_server_config_rec *) addv; @@ -935,7 +935,7 @@ static void tryit(request_rec *r, unsigned char *buf, int nb, int checkzmagic) * apprentice - load configuration from the magic file r * API request record */ -static int apprentice(server_rec *s, ap_context_t *p) +static int apprentice(server_rec *s, ap_pool_t *p) { ap_file_t *f = NULL; ap_status_t result; @@ -1075,7 +1075,7 @@ static unsigned long signextend(server_rec *s, struct magic *m, unsigned long v) /* * parse one line from magic file, put into magic[index++] if valid */ -static int parse(server_rec *serv, ap_context_t *p, char *l, int lineno) +static int parse(server_rec *serv, ap_pool_t *p, char *l, int lineno) { struct magic *m; char *t, *s; @@ -2145,14 +2145,14 @@ struct uncompress_parms { int method; }; -static int uncompress_child(struct uncompress_parms *parm, ap_context_t *cntxt, +static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt, BUFF **script_in) { int rc = 1; char *new_argv[4]; char **env; request_rec *r = parm->r; - ap_context_t *child_context = cntxt; + ap_pool_t *child_context = cntxt; ap_procattr_t *procattr; ap_proc_t *procnew = NULL; ap_file_t *file = NULL; @@ -2213,7 +2213,7 @@ static int uncompress(request_rec *r, int method, { struct uncompress_parms parm; BUFF *bout = NULL; - ap_context_t *sub_context; + ap_pool_t *sub_context; ap_status_t rv; parm.r = r; @@ -2223,7 +2223,7 @@ static int uncompress(request_rec *r, int method, * there are cases (i.e. generating directory indicies with mod_autoindex) * where we would end up with LOTS of zombies. */ - if (ap_create_context(&sub_context, r->pool) != APR_SUCCESS) + if (ap_create_pool(&sub_context, r->pool) != APR_SUCCESS) return -1; if ((rv = uncompress_child(&parm, sub_context, &bout)) != APR_SUCCESS) { @@ -2393,7 +2393,7 @@ static int revision_suffix(request_rec *r) /* * initialize the module */ -static void magic_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *main_server) +static void magic_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server) { int result; magic_server_config_rec *conf; diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index a2ec8e4849..7ce032d936 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -148,7 +148,7 @@ typedef struct { module MODULE_VAR_EXPORT setenvif_module; -static void *create_setenvif_config(ap_context_t *p, server_rec *dummy) +static void *create_setenvif_config(ap_pool_t *p, server_rec *dummy) { sei_cfg_rec *new = (sei_cfg_rec *) ap_palloc(p, sizeof(sei_cfg_rec)); @@ -156,7 +156,7 @@ static void *create_setenvif_config(ap_context_t *p, server_rec *dummy) return (void *) new; } -static void *merge_setenvif_config(ap_context_t *p, void *basev, void *overridesv) +static void *merge_setenvif_config(ap_pool_t *p, void *basev, void *overridesv) { sei_cfg_rec *a = ap_pcalloc(p, sizeof(sei_cfg_rec)); sei_cfg_rec *base = basev, *overrides = overridesv; diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c index b52eb0a3d4..b37010e45c 100644 --- a/modules/metadata/mod_unique_id.c +++ b/modules/metadata/mod_unique_id.c @@ -162,7 +162,7 @@ static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX], unique_id_rec_total_size, unique_id_rec_size_uu; -static void unique_id_global_init(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *main_server) +static void unique_id_global_init(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *main_server) { #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 @@ -246,7 +246,7 @@ static void unique_id_global_init(ap_context_t *p, ap_context_t *plog, ap_contex #endif } -static void unique_id_child_init(ap_context_t *p, server_rec *s) +static void unique_id_child_init(ap_pool_t *p, server_rec *s) { pid_t pid; #ifdef HAVE_GETTIMEOFDAY diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c index db49b7c7c9..3ec22492d2 100644 --- a/modules/metadata/mod_usertrack.c +++ b/modules/metadata/mod_usertrack.c @@ -191,7 +191,7 @@ static int spot_cookie(request_rec *r) return OK; /* We set our cookie */ } -static void *make_cookie_log_state(ap_context_t *p, server_rec *s) +static void *make_cookie_log_state(ap_pool_t *p, server_rec *s) { cookie_log_state *cls = (cookie_log_state *) ap_palloc(p, sizeof(cookie_log_state)); @@ -201,7 +201,7 @@ static void *make_cookie_log_state(ap_context_t *p, server_rec *s) return (void *) cls; } -static void *make_cookie_dir(ap_context_t *p, char *d) +static void *make_cookie_dir(ap_pool_t *p, char *d) { cookie_dir_rec *dcfg; diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 92ee4d4408..1d086f3000 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -234,7 +234,7 @@ static int proxy_fixup(request_rec *r) return OK; /* otherwise; we've done the best we can */ } -static void proxy_init(server_rec *r, ap_context_t *p) +static void proxy_init(server_rec *r, ap_pool_t *p) { ap_proxy_garbage_init(r, p); } @@ -405,7 +405,7 @@ static int proxy_handler(request_rec *r) /* Setup configurable data */ static void * - create_proxy_config(ap_context_t *p, server_rec *s) + create_proxy_config(ap_pool_t *p, server_rec *s) { proxy_server_conf *ps = ap_pcalloc(p, sizeof(proxy_server_conf)); diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index c2a4b7d9c1..3c33507394 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -289,11 +289,11 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url, int ap_proxy_hex2c(const char *x); void ap_proxy_c2hex(int ch, char *x); -char *ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t, +char *ap_proxy_canonenc(ap_pool_t *p, const char *x, int len, enum enctype t, int isenc); -char *ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp, +char *ap_proxy_canon_netloc(ap_pool_t *p, char **const urlp, char **userp, char **passwordp, char **hostp, int *port); -const char *ap_proxy_date_canon(ap_context_t *p, const char *x); +const char *ap_proxy_date_canon(ap_pool_t *p, const char *x); table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f); long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c); void ap_proxy_send_headers(request_rec *r, const char *respline, ap_table_t *hdrs); @@ -304,12 +304,12 @@ void ap_proxy_sec2hex(int t, char *y); cache_req *ap_proxy_cache_error(cache_req *r); int ap_proxyerror(request_rec *r, int statuscode, const char *message); const char *ap_proxy_host2addr(const char *host, struct hostent *reqhp); -int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p); -int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p); -int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p); -int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p); +int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_pool_t *p); +int ap_proxy_is_domainname(struct dirconn_entry *This, ap_pool_t *p); +int ap_proxy_is_hostname(struct dirconn_entry *This, ap_pool_t *p); +int ap_proxy_is_word(struct dirconn_entry *This, ap_pool_t *p); int ap_proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r); -int ap_proxy_garbage_init(server_rec *, ap_context_t *); +int ap_proxy_garbage_init(server_rec *, ap_pool_t *); /* This function is called by ap_table_do() for all header lines */ int ap_proxy_send_hdr_line(void *p, const char *key, const char *value); unsigned ap_proxy_bputs2(const char *data, BUFF *client, cache_req *cache); diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index 3adced6be5..9804bcd510 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -119,7 +119,7 @@ static int ftp_check_string(const char *x) int ap_proxy_ftp_canon(request_rec *r, char *url) { char *user, *password, *host, *path, *parms, *strp, sport[7]; - ap_context_t *p = r->pool; + ap_pool_t *p = r->pool; const char *err; int port; @@ -461,7 +461,7 @@ int ap_proxy_ftp_handler(request_rec *r, cache_req *c, char *url) ap_table_t *resp_hdrs; BUFF *f; BUFF *data = NULL; - ap_context_t *p = r->pool; + ap_pool_t *p = r->pool; int one = 1; const long int zero = 0L; NET_SIZE_T clen; diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index ab0da44330..895fb9ec93 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -135,7 +135,7 @@ static const char *proxy_location_reverse_map(request_rec *r, const char *url) } /* Clear all connection-based headers from the incoming headers ap_table_t */ -static void clear_connection(ap_context_t *p, ap_table_t *headers) +static void clear_connection(ap_pool_t *p, ap_table_t *headers) { const char *name; char *next = ap_pstrdup(p, ap_table_get(headers, "Connection")); @@ -182,7 +182,7 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url, BUFF *f; char buffer[HUGE_STRING_LEN]; char portstr[32]; - ap_context_t *p = r->pool; + ap_pool_t *p = r->pool; const long int zero = 0L; int destport = 0; char *destportstr = NULL; diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 3b14f936b3..8380258870 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -137,7 +137,7 @@ void ap_proxy_c2hex(int ch, char *x) * those which must not be touched. */ char * - ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t, int isenc) + ap_proxy_canonenc(ap_pool_t *p, const char *x, int len, enum enctype t, int isenc) { int i, j, ch; char *y; @@ -213,7 +213,7 @@ char * * Returns an error string. */ char * - ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp, + ap_proxy_canon_netloc(ap_pool_t *p, char **const urlp, char **userp, char **passwordp, char **hostp, int *port) { int i; @@ -311,7 +311,7 @@ static const char * const lwday[7] = * formatted, then it exits very quickly. */ const char * - ap_proxy_date_canon(ap_context_t *p, const char *x) + ap_proxy_date_canon(ap_pool_t *p, const char *x) { int wk, mday, year, hour, min, sec, mon; char *q, month[4], zone[4], week[4]; @@ -907,7 +907,7 @@ static const char * } /* Return TRUE if addr represents an IP address (or an IP network address) */ -int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p) +int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_pool_t *p) { const char *addr = This->name; long ip_addr[4]; @@ -1103,7 +1103,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr represents a domain name */ -int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p) +int ap_proxy_is_domainname(struct dirconn_entry *This, ap_pool_t *p) { char *addr = This->name; int i; @@ -1157,7 +1157,7 @@ static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr represents a host name */ -int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p) +int ap_proxy_is_hostname(struct dirconn_entry *This, ap_pool_t *p) { struct hostent host; char *addr = This->name; @@ -1224,7 +1224,7 @@ static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r) } /* Return TRUE if addr is to be matched as a word */ -int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p) +int ap_proxy_is_word(struct dirconn_entry *This, ap_pool_t *p) { This->matcher = proxy_match_word; return 1; diff --git a/modules/test/mod_test_util_uri.c b/modules/test/mod_test_util_uri.c index c0e59d7f39..eb291f15fc 100644 --- a/modules/test/mod_test_util_uri.c +++ b/modules/test/mod_test_util_uri.c @@ -139,7 +139,7 @@ static char *my_stpcpy(char *d, const char *s) static unsigned iterate_pieces(request_rec *r, const test_uri_t *pieces, int row) { unsigned u; - ap_context_t *sub; + ap_pool_t *sub; char *input_uri; char *strp; uri_components result; diff --git a/os/bs2000/bs2login.c b/os/bs2000/bs2login.c index aedddba9da..9f5483c0fd 100644 --- a/os/bs2000/bs2login.c +++ b/os/bs2000/bs2login.c @@ -169,7 +169,7 @@ static bs2_ForkType os_forktype(void) /* This routine is called by http_core for the BS2000Account directive */ /* It stores the account name for later use */ -const char *os_set_account(ap_context_t *p, const char *account) +const char *os_set_account(ap_pool_t *p, const char *account) { char account_temp[ACCT_LEN+1]; diff --git a/os/os2/os.h b/os/os2/os.h index 807a5c843a..db354dccb6 100644 --- a/os/os2/os.h +++ b/os/os2/os.h @@ -89,9 +89,9 @@ INLINE int ap_os_is_path_absolute(const char *file); extern int ap_os_is_path_absolute(const char *file); #endif -char *ap_os_canonical_filename(ap_context_t *p, const char *file); -char *ap_os_case_canonical_filename(ap_context_t *p, const char *szFile); -char *ap_os_systemcase_filename(ap_context_t *p, const char *szFile); +char *ap_os_canonical_filename(ap_pool_t *p, const char *file); +char *ap_os_case_canonical_filename(ap_pool_t *p, const char *szFile); +char *ap_os_systemcase_filename(ap_pool_t *p, const char *szFile); /* FIXME: the following should be implemented on this platform */ #define ap_os_is_filename_valid(f) (1) diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c index e0cbd79c2b..1f813e7de4 100644 --- a/os/os2/util_os2.c +++ b/os/os2/util_os2.c @@ -69,7 +69,7 @@ #include <string.h> -API_EXPORT(char *)ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile) +API_EXPORT(char *)ap_os_case_canonical_filename(ap_pool_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; char buf2[HUGE_STRING_LEN]; @@ -119,7 +119,7 @@ static void fix_component(char *path, char *lastcomp) -char *ap_os_systemcase_canonical_filename(ap_context_t *pPool, const char *szFile) +char *ap_os_systemcase_canonical_filename(ap_pool_t *pPool, const char *szFile) { char *szCanonicalFile = ap_os_case_canonical_filename(pPool, szFile); int startslash = 2, slashnum=0; @@ -149,7 +149,7 @@ char *ap_os_systemcase_canonical_filename(ap_context_t *pPool, const char *szFil -char *ap_os_canonical_filename(ap_context_t *pPool, const char *szFile) +char *ap_os_canonical_filename(ap_pool_t *pPool, const char *szFile) { char *szCanonicalFile = ap_os_systemcase_canonical_filename(pPool, szFile); strlwr(szCanonicalFile); diff --git a/os/tpf/os.c b/os/tpf/os.c index e70d1abf19..5cd9df4ae9 100644 --- a/os/tpf/os.c +++ b/os/tpf/os.c @@ -212,7 +212,7 @@ int execvp(const char *file, char *const argv[]) -int ap_tpf_spawn_child(ap_context_t *p, int (*func) (void *, child_info *), +int ap_tpf_spawn_child(ap_pool_t *p, int (*func) (void *, child_info *), void *data, enum kill_conditions kill_how, int *pipe_in, int *pipe_out, int *pipe_err, int out_fds[], int in_fds[], int err_fds[]) @@ -396,7 +396,7 @@ int os_check_server(char *server) { return 0; } -void os_note_additional_cleanups(ap_context_t *p, int sd) { +void os_note_additional_cleanups(ap_pool_t *p, int sd) { char sockfilename[50]; /* write the socket to file so that TPF socket device driver will close socket in case we happen to abend. */ diff --git a/os/win32/os.h b/os/win32/os.h index dd9c08ae8e..9f4b2e5927 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -160,9 +160,9 @@ __inline int ap_os_is_path_absolute(const char *file) } /* OS-dependent filename routines in util_win32.c */ -API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file); -API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile); -API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, const char *szFile); +API_EXPORT(char *) ap_os_canonical_filename(ap_pool_t *p, const char *file); +API_EXPORT(char *) ap_os_case_canonical_filename(ap_pool_t *pPool, const char *szFile); +API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool, const char *szFile); int ap_os_is_filename_valid(const char *file); int os_strftime(char *, size_t , const char *, const struct tm *); diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c index d686a5d8ec..d30fbea0d5 100644 --- a/os/win32/util_win32.c +++ b/os/win32/util_win32.c @@ -87,7 +87,7 @@ static BOOL OnlyDots(char *pString) * is present on the existing path. This routine also * converts alias names to long names. */ -API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, +API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; @@ -207,7 +207,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, /* Perform canonicalization with the exception that the * input case is preserved. */ -API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, +API_EXPORT(char *) ap_os_case_canonical_filename(ap_pool_t *pPool, const char *szFile) { char *pNewStr; @@ -326,7 +326,7 @@ API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, /* Perform complete canonicalization. */ -API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *pPool, const char *szFile) +API_EXPORT(char *) ap_os_canonical_filename(ap_pool_t *pPool, const char *szFile) { char *pNewName; pNewName = ap_os_case_canonical_filename(pPool, szFile); diff --git a/server/config.c b/server/config.c index b515ecae3a..8da3135417 100644 --- a/server/config.c +++ b/server/config.c @@ -94,12 +94,12 @@ HOOK_STRUCT( IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED) IMPLEMENT_HOOK_VOID(post_config, - (ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s), + (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) IMPLEMENT_HOOK_VOID(open_logs, - (ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s), + (ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s), (pconf,plog,ptemp,s)) -IMPLEMENT_HOOK_VOID(child_init,(ap_context_t *pchild, server_rec *s),(pchild,s)) +IMPLEMENT_HOOK_VOID(child_init,(ap_pool_t *pchild, server_rec *s),(pchild,s)) /**************************************************************** * @@ -120,8 +120,8 @@ API_VAR_EXPORT module *top_module = NULL; API_VAR_EXPORT module **ap_loaded_modules=NULL; typedef int (*handler_func) (request_rec *); -typedef void *(*dir_maker_func) (ap_context_t *, char *); -typedef void *(*merger_func) (ap_context_t *, void *, void *); +typedef void *(*dir_maker_func) (ap_pool_t *, char *); +typedef void *(*merger_func) (ap_pool_t *, void *, void *); /* Dealing with config vectors. These are associated with per-directory, * per-server, and per-request configuration, and have a void* pointer for @@ -150,14 +150,14 @@ API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val) } #endif -static void *create_empty_config(ap_context_t *p) +static void *create_empty_config(ap_pool_t *p) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); return (void *) conf_vector; } -static void *create_default_per_dir_config(ap_context_t *p) +static void *create_default_per_dir_config(ap_pool_t *p) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; @@ -173,7 +173,7 @@ static void *create_default_per_dir_config(ap_context_t *p) } void * - ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new) + ap_merge_per_dir_configs(ap_pool_t *p, void *base, void *new) { void **conf_vector = (void **) ap_palloc(p, sizeof(void *) * total_modules); void **base_vector = (void **) base; @@ -193,7 +193,7 @@ void * return (void *) conf_vector; } -static void *create_server_config(ap_context_t *p, server_rec *s) +static void *create_server_config(ap_pool_t *p, server_rec *s) { void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); module *modp; @@ -206,7 +206,7 @@ static void *create_server_config(ap_context_t *p, server_rec *s) return (void *) conf_vector; } -static void merge_server_configs(ap_context_t *p, void *base, void *virt) +static void merge_server_configs(ap_pool_t *p, void *base, void *virt) { /* Can reuse the 'virt' vector for the spine of it, since we don't * have to deal with the moral equivalent of .htaccess files here... @@ -227,17 +227,17 @@ static void merge_server_configs(ap_context_t *p, void *base, void *virt) } } -void *ap_create_request_config(ap_context_t *p) +void *ap_create_request_config(ap_pool_t *p) { return create_empty_config(p); } -void *ap_create_conn_config(ap_context_t *p) +void *ap_create_conn_config(ap_pool_t *p) { return create_empty_config(p); } -CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p) +CORE_EXPORT(void *) ap_create_per_dir_config(ap_pool_t *p) { return create_empty_config(p); } @@ -256,7 +256,7 @@ typedef struct { static fast_handler_rec *handlers; static fast_handler_rec *wildhandlers; -static void init_handlers(ap_context_t *p) +static void init_handlers(ap_pool_t *p) { module *modp; int nhandlers = 0; @@ -966,7 +966,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_pt static cmd_parms default_parms = {NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; -API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *file) +API_EXPORT(const char *) ap_server_root_relative(ap_pool_t *p, const char *file) { if(ap_os_is_path_absolute(file)) return file; @@ -1014,8 +1014,8 @@ static int arr_elts_close(void *param) return 0; } -static void process_command_config(server_rec *s, ap_array_header_t *arr, ap_context_t *p, - ap_context_t *ptemp) +static void process_command_config(server_rec *s, ap_array_header_t *arr, ap_pool_t *p, + ap_pool_t *ptemp) { const char *errmsg; cmd_parms parms; @@ -1044,7 +1044,7 @@ static void process_command_config(server_rec *s, ap_array_header_t *arr, ap_con ap_cfg_closefile(parms.config_file); } -void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp) +void ap_process_resource_config(server_rec *s, const char *fname, ap_pool_t *p, ap_pool_t *ptemp) { const char *errmsg; cmd_parms parms; @@ -1166,7 +1166,7 @@ int ap_parse_htaccess(void **result, request_rec *r, int override, } -CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname, +CORE_EXPORT(const char *) ap_init_virtual_host(ap_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps) { server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec)); @@ -1222,7 +1222,7 @@ CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *host } -static void fixup_virtual_hosts(ap_context_t *p, server_rec *main_server) +static void fixup_virtual_hosts(ap_pool_t *p, server_rec *main_server) { server_rec *virt; @@ -1261,13 +1261,13 @@ static void fixup_virtual_hosts(ap_context_t *p, server_rec *main_server) * Getting *everything* configured... */ -static void init_config_globals(ap_context_t *p) +static void init_config_globals(ap_pool_t *p) { /* Global virtual host hash bucket pointers. Init to null. */ ap_init_vhost_config(p); } -static server_rec *init_server_config(process_rec *process, ap_context_t *p) +static server_rec *init_server_config(process_rec *process, ap_pool_t *p) { server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec)); @@ -1300,9 +1300,9 @@ static server_rec *init_server_config(process_rec *process, ap_context_t *p) } -server_rec *ap_read_config(process_rec *process, ap_context_t *ptemp, const char *confname) +server_rec *ap_read_config(process_rec *process, ap_pool_t *ptemp, const char *confname) { - ap_context_t *p = process->pconf; + ap_pool_t *p = process->pconf; server_rec *s = init_server_config(process, p); init_config_globals(p); @@ -1322,7 +1322,7 @@ server_rec *ap_read_config(process_rec *process, ap_context_t *ptemp, const char return s; } -void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m) +void ap_single_module_configure(ap_pool_t *p, server_rec *s, module *m) { if (m->create_server_config) ap_set_module_config(s->module_config, m, @@ -1332,7 +1332,7 @@ void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m) (*m->create_dir_config)(p, NULL)); } -void ap_run_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) +void ap_run_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp) { module *m; @@ -1342,13 +1342,13 @@ void ap_run_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) init_handlers(p); } -void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s) +void ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec *s) { ap_run_post_config(pconf,plog,ptemp,s); init_handlers(pconf); } -void ap_child_init_hook(ap_context_t *pchild, server_rec *s) +void ap_child_init_hook(ap_pool_t *pchild, server_rec *s) { /* TODO: uh this seems ugly, is there a better way? */ /*ap_child_init_alloc(); PUT THIS BACK IN XXXXX */ diff --git a/server/connection.c b/server/connection.c index 89e404f10d..6113d19f9c 100644 --- a/server/connection.c +++ b/server/connection.c @@ -253,7 +253,7 @@ int ap_process_http_connection(conn_rec *c) structure, but for now... */ -conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_connection(ap_pool_t *p, server_rec *server, BUFF *inout, const struct sockaddr_in *remaddr, const struct sockaddr_in *saddr, long id) { @@ -283,7 +283,7 @@ conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout, -conn_rec *ap_new_apr_connection(ap_context_t *p, server_rec *server, BUFF *inout, +conn_rec *ap_new_apr_connection(ap_pool_t *p, server_rec *server, BUFF *inout, const ap_socket_t *conn_socket, long id) { struct sockaddr_in *sa_local, *sa_remote; diff --git a/server/listen.c b/server/listen.c index 78e2f6b973..901926a918 100644 --- a/server/listen.c +++ b/server/listen.c @@ -72,7 +72,7 @@ static int ap_listenbacklog; static int send_buffer_size; /* TODO: make_sock is just begging and screaming for APR abstraction */ -static ap_status_t make_sock(ap_context_t *p, ap_listen_rec *server) +static ap_status_t make_sock(ap_pool_t *p, ap_listen_rec *server) { ap_socket_t *s = server->sd; int one = 1; @@ -202,7 +202,7 @@ static void alloc_listener(process_rec *process, char *addr, unsigned int port) int ap_listen_open(process_rec *process, unsigned port) { - ap_context_t *pconf = process->pconf; + ap_pool_t *pconf = process->pconf; ap_listen_rec *lr; ap_listen_rec *next; int num_open; diff --git a/server/log.c b/server/log.c index c67036628d..bbc887388b 100644 --- a/server/log.c +++ b/server/log.c @@ -159,7 +159,7 @@ static const TRANS priorities[] = { {NULL, -1}, }; -static int log_child(ap_context_t *p, const char *progname, +static int log_child(ap_pool_t *p, const char *progname, ap_file_t **fpin) { /* Child process code for 'ErrorLog "|..."'; @@ -200,7 +200,7 @@ static int log_child(ap_context_t *p, const char *progname, return(rc); } -static void open_error_log(server_rec *s, ap_context_t *p) +static void open_error_log(server_rec *s, ap_pool_t *p) { const char *fname; int rc; @@ -255,7 +255,7 @@ static void open_error_log(server_rec *s, ap_context_t *p) } } -void ap_open_logs(server_rec *s_main, ap_context_t *p) +void ap_open_logs(server_rec *s_main, ap_pool_t *p) { ap_status_t rc = APR_SUCCESS; server_rec *virt, *q; @@ -472,7 +472,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level, va_end(args); } -void ap_log_pid(ap_context_t *p, const char *fname) +void ap_log_pid(ap_pool_t *p, const char *fname) { ap_file_t *pid_file = NULL; ap_finfo_t finfo; @@ -678,7 +678,7 @@ static ap_status_t piped_log_cleanup_for_exec(void *data) return APR_SUCCESS; } -API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program) +API_EXPORT(piped_log *) ap_open_piped_log(ap_pool_t *p, const char *program) { piped_log *pl; @@ -713,7 +713,7 @@ static ap_status_t piped_log_cleanup(void *data) return APR_SUCCESS; } -API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program) +API_EXPORT(piped_log *) ap_open_piped_log(ap_pool_t *p, const char *program) { piped_log *pl; ap_file_t *dummy = NULL; diff --git a/server/main.c b/server/main.c index da5d061056..68709998fd 100644 --- a/server/main.c +++ b/server/main.c @@ -203,13 +203,13 @@ static process_rec *create_process(int argc, const char **argv) process_rec *process; { - ap_context_t *cntx; + ap_pool_t *cntx; ap_status_t stat; - stat = ap_create_context(&cntx, NULL); + stat = ap_create_pool(&cntx, NULL); if (stat != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, - "ap_create_context() failed to create " + "ap_create_pool() failed to create " "initial context"); ap_terminate(); exit(1); @@ -218,7 +218,7 @@ static process_rec *create_process(int argc, const char **argv) process = ap_palloc(cntx, sizeof(process_rec)); process->pool = cntx; } - ap_create_context(&process->pconf, process->pool); + ap_create_pool(&process->pconf, process->pool); process->argc = argc; process->argv = argv; process->short_name = ap_filename_of_pathname(argv[0]); @@ -276,7 +276,7 @@ static void usage(process_rec *process) destroy_and_exit_process(process, 1); } -ap_context_t *g_pHookPool; +ap_pool_t *g_pHookPool; #ifdef WIN32 API_EXPORT_NONSTD(int) apache_main(int argc, char *argv[]) @@ -290,11 +290,11 @@ API_EXPORT_NONSTD(int) main(int argc, char *argv[]) const char *def_server_root = HTTPD_ROOT; process_rec *process; server_rec *server_conf; - ap_context_t *pglobal; - ap_context_t *pconf; - ap_context_t *plog; /* Pool of log streams, reset _after_ each read of conf */ - ap_context_t *ptemp; /* Pool for temporary config stuff, reset often */ - ap_context_t *pcommands; /* Pool for -C and -c switches */ + ap_pool_t *pglobal; + ap_pool_t *pconf; + ap_pool_t *plog; /* Pool of log streams, reset _after_ each read of conf */ + ap_pool_t *ptemp; /* Pool for temporary config stuff, reset often */ + ap_pool_t *pcommands; /* Pool for -C and -c switches */ module **mod; #ifndef WIN32 /* done in main_win32.c */ @@ -311,7 +311,7 @@ API_EXPORT_NONSTD(int) main(int argc, char *argv[]) ap_setup_prelinked_modules(process); - ap_create_context(&pcommands, pglobal); + ap_create_pool(&pcommands, pglobal); ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *)); ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *)); @@ -356,8 +356,8 @@ API_EXPORT_NONSTD(int) main(int argc, char *argv[]) } } - ap_create_context(&plog, pglobal); - ap_create_context(&ptemp, pconf); + ap_create_pool(&plog, pglobal); + ap_create_pool(&ptemp, pconf); /* Note that we preflight the config file once before reading it _again_ in the main loop. @@ -382,7 +382,7 @@ API_EXPORT_NONSTD(int) main(int argc, char *argv[]) for (mod = ap_prelinked_modules; *mod != NULL; mod++) { ap_register_hooks(*mod); } - ap_create_context(&ptemp, pconf); + ap_create_pool(&ptemp, pconf); ap_server_root = def_server_root; ap_run_pre_config(pconf, plog, ptemp); server_conf = ap_read_config(process, ptemp, confname); diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index b75c514df7..f0cf8ae933 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -141,9 +141,9 @@ static int one_process = 0; int raise_sigstop_flags; #endif -static ap_context_t *pconf; /* Pool for config stuff */ -static ap_context_t *pchild; /* Pool for httpd child stuff */ -static ap_context_t *thread_pool_parent; /* Parent of per-thread pools */ +static ap_pool_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pchild; /* Pool for httpd child stuff */ +static ap_pool_t *thread_pool_parent; /* Parent of per-thread pools */ static pthread_mutex_t thread_pool_parent_mutex; static int child_num; @@ -593,7 +593,7 @@ int ap_graceful_stop_signalled(void) * Child process main loop. */ -static void process_socket(ap_context_t *p, ap_socket_t *sock, long conn_id) +static void process_socket(ap_pool_t *p, ap_socket_t *sock, long conn_id) { BUFF *conn_io; conn_rec *current_conn; @@ -699,8 +699,8 @@ static void check_pipe_of_death(void) static void *worker_thread(void *arg) { ap_socket_t *csd = NULL; - ap_context_t *tpool; /* Pool for this thread */ - ap_context_t *ptrans; /* Pool for per-transaction stuff */ + ap_pool_t *tpool; /* Pool for this thread */ + ap_pool_t *ptrans; /* Pool for per-transaction stuff */ ap_socket_t *sd = NULL; int srv; int curr_pollfd, last_pollfd = 0; @@ -710,9 +710,9 @@ static void *worker_thread(void *arg) ap_status_t rv; pthread_mutex_lock(&thread_pool_parent_mutex); - ap_create_context(&tpool, thread_pool_parent); + ap_create_pool(&tpool, thread_pool_parent); pthread_mutex_unlock(&thread_pool_parent_mutex); - ap_create_context(&ptrans, tpool); + ap_create_pool(&ptrans, tpool); while (!workers_may_exit) { workers_may_exit |= (max_requests_per_child != 0) && (requests_this_child <= 0); @@ -857,7 +857,7 @@ static void child_main(int child_num_arg) my_pid = getpid(); child_num = child_num_arg; - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); /*stuff to do before we switch id's, so we have permissions.*/ @@ -908,7 +908,7 @@ static void child_main(int child_num_arg) for (i = 0; i < max_threads; i++) { worker_thread_free_ids[i] = i; } - ap_create_context(&thread_pool_parent, pchild); + ap_create_pool(&thread_pool_parent, pchild); pthread_mutex_init(&thread_pool_parent_mutex, NULL); pthread_mutex_init(&idle_thread_count_mutex, NULL); pthread_mutex_init(&worker_thread_count_mutex, NULL); @@ -1158,7 +1158,7 @@ static ap_status_t cleanup_fd(void *fdptr) return APR_SUCCESS; } -int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) +int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) { int remaining_children_to_start; int i; @@ -1317,7 +1317,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) return 0; } -static void dexter_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) +static void dexter_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp) { static int restart_num = 0; diff --git a/server/mpm/dexter/scoreboard.c b/server/mpm/dexter/scoreboard.c index f5fe03168b..bedd2bd41a 100644 --- a/server/mpm/dexter/scoreboard.c +++ b/server/mpm/dexter/scoreboard.c @@ -139,7 +139,7 @@ caddr_t get_shared_heap(const char *Name) return BaseAddress; } -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { caddr_t m; @@ -162,7 +162,7 @@ static void setup_shared_mem(ap_context_t *p) ap_scoreboard_image = (scoreboard *) m; } -API_EXPORT(void) reopen_scoreboard(ap_context_t *p) +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p) { caddr_t m; int rc; @@ -215,7 +215,7 @@ static void cleanup_shared_mem(void *d) shm_unlink(ap_scoreboard_fname); } -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { char buf[512]; caddr_t m; @@ -249,13 +249,13 @@ static void setup_shared_mem(ap_context_t *p) ap_scoreboard_image = (scoreboard *) m; } -API_EXPORT(void) reopen_scoreboard(ap_context_t *p) +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p) { } #elif defined(USE_MMAP_SCOREBOARD) -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { caddr_t m; @@ -333,7 +333,7 @@ static void setup_shared_mem(ap_context_t *p) ap_scoreboard_image = (scoreboard *) m; } -API_EXPORT(void) reopen_scoreboard(ap_context_t *p) +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p) { } @@ -341,7 +341,7 @@ API_EXPORT(void) reopen_scoreboard(ap_context_t *p) static key_t shmkey = IPC_PRIVATE; static int shmid = -1; -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { struct shmid_ds shmbuf; const server_rec * server_conf = ap_get_server_conf(); @@ -427,14 +427,14 @@ static void setup_shared_mem(ap_context_t *p) #endif } -API_EXPORT(void) reopen_scoreboard(ap_context_t *p) +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p) { } #endif /* Called by parent process */ -void reinit_scoreboard(ap_context_t *p) +void reinit_scoreboard(ap_pool_t *p) { if (ap_scoreboard_image == NULL) { setup_shared_mem(p); @@ -491,7 +491,7 @@ const char *ap_get_connection_status(long conn_id, const char *key) return NULL; } -ap_array_header_t *ap_get_connections(ap_context_t *p) +ap_array_header_t *ap_get_connections(ap_pool_t *p) { int i; ap_array_header_t *connection_list; @@ -510,7 +510,7 @@ ap_array_header_t *ap_get_connections(ap_context_t *p) return connection_list; } -ap_array_header_t *ap_get_connection_keys(ap_context_t *p, long conn_id) +ap_array_header_t *ap_get_connection_keys(ap_pool_t *p, long conn_id) { int i = 0; status_table_entry *ss; @@ -562,7 +562,7 @@ void ap_update_connection_status(long conn_id, const char *key, return; } -ap_array_header_t *ap_get_status_table(ap_context_t *p) +ap_array_header_t *ap_get_status_table(ap_pool_t *p) { int i, j; ap_array_header_t *server_status; diff --git a/server/mpm/dexter/scoreboard.h b/server/mpm/dexter/scoreboard.h index 028be30f6f..2c9d0b7061 100644 --- a/server/mpm/dexter/scoreboard.h +++ b/server/mpm/dexter/scoreboard.h @@ -72,13 +72,13 @@ extern "C" { #include "mpm_default.h" /* For HARD_.*_LIMIT */ /* The generic shared memory chunk code */ -void reinit_scoreboard(ap_context_t *p); +void reinit_scoreboard(ap_pool_t *p); #if defined(USE_OS2_SCOREBOARD) caddr_t create_shared_heap(const char *name, size_t size); caddr_t get_shared_heap(const char *Name); #endif -API_EXPORT(void) reopen_scoreboard(ap_context_t *p); +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p); /* The stuff for Dexter's status table */ diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c index 9b77a0ef69..f2f06ed542 100644 --- a/server/mpm/mpmt_beos/mpmt_beos.c +++ b/server/mpm/mpmt_beos/mpmt_beos.c @@ -97,8 +97,8 @@ static int num_listenfds = 0; static struct pollfd *listenfds; ap_lock_t *accept_mutex = NULL; -static ap_context_t *pconf; /* Pool for config stuff */ -static ap_context_t *pchild; /* Pool for httpd child stuff */ +static ap_pool_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pchild; /* Pool for httpd child stuff */ static int my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ @@ -112,7 +112,7 @@ typedef struct { int pid; thread_id tid; int sd; - ap_context_t *tpool; /* "pthread" would be confusing */ + ap_pool_t *tpool; /* "pthread" would be confusing */ } proc_info; #define SERVER_DEAD 0 @@ -630,7 +630,7 @@ int ap_graceful_stop_signalled(void) * Child process main loop. */ -static void process_socket(ap_context_t *p, ap_socket_t *sock, int my_child_num, int my_thread_num) +static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, int my_thread_num) { BUFF *conn_io; conn_rec *current_conn; @@ -668,10 +668,10 @@ static int32 worker_thread(void * dummy) proc_info * ti = dummy; int process_slot = ti->pid; int thread_slot = ti->tid; - ap_context_t *tpool = ti->tpool; + ap_pool_t *tpool = ti->tpool; struct sockaddr sa_client; ap_socket_t *csd = NULL; - ap_context_t *ptrans; /* Pool for per-transaction stuff */ + ap_pool_t *ptrans; /* Pool for per-transaction stuff */ ap_socket_t *sd = NULL; int srv; int curr_pollfd, last_pollfd = 0; @@ -684,7 +684,7 @@ static int32 worker_thread(void * dummy) sigfillset(&sig_mask); sigprocmask(SIG_BLOCK, &sig_mask, NULL); - ap_create_context(&ptrans, tpool); + ap_create_pool(&ptrans, tpool); ap_lock(worker_thread_count_mutex); worker_thread_count++; @@ -778,7 +778,7 @@ static int32 child_main(void * data) ap_status_t rv; my_pid = getpid(); - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); if (beosd_setup_child()) { clean_child_exit(APEXIT_CHILDFATAL); @@ -822,7 +822,7 @@ static int32 child_main(void * data) my_info->pid = my_child_num; my_info->tid = i; my_info->sd = 0; - ap_create_context(&my_info->tpool, pchild); + ap_create_pool(&my_info->tpool, pchild); /* We are creating threads right now */ @@ -1038,7 +1038,7 @@ static void server_main_loop(int remaining_children_to_start) } } -int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) +int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) { int remaining_children_to_start; ap_status_t rv; @@ -1180,7 +1180,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) return 0; } -static void mpmt_beos_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) +static void mpmt_beos_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp) { static int restart_num = 0; diff --git a/server/mpm/mpmt_beos/scoreboard.c b/server/mpm/mpmt_beos/scoreboard.c index 053ff2bee5..ca87f4867e 100644 --- a/server/mpm/mpmt_beos/scoreboard.c +++ b/server/mpm/mpmt_beos/scoreboard.c @@ -68,10 +68,10 @@ #include "scoreboard.h" scoreboard *ap_scoreboard_image = NULL; -extern ap_context_t * pconf; +extern ap_pool_t * pconf; static int maintain_connection_status = 1; -void reinit_scoreboard(ap_context_t *p) +void reinit_scoreboard(ap_pool_t *p) { ap_assert(!ap_scoreboard_image); ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE); @@ -161,7 +161,7 @@ const char *ap_get_connection_status(long conn_id, const char *key) return NULL; } -ap_array_header_t *ap_get_connections(ap_context_t *p) +ap_array_header_t *ap_get_connections(ap_pool_t *p) { int i; ap_array_header_t *connection_list; @@ -177,7 +177,7 @@ ap_array_header_t *ap_get_connections(ap_context_t *p) return connection_list; } -ap_array_header_t *ap_get_connection_keys(ap_context_t *p, long conn_id) +ap_array_header_t *ap_get_connection_keys(ap_pool_t *p, long conn_id) { int i = 0; status_table_entry *ss; @@ -197,7 +197,7 @@ ap_array_header_t *ap_get_connection_keys(ap_context_t *p, long conn_id) return key_list; } -ap_array_header_t *ap_get_status_table(ap_context_t *p) +ap_array_header_t *ap_get_status_table(ap_pool_t *p) { int i, j; ap_array_header_t *server_status; diff --git a/server/mpm/mpmt_beos/scoreboard.h b/server/mpm/mpmt_beos/scoreboard.h index 43738268ab..116be56190 100644 --- a/server/mpm/mpmt_beos/scoreboard.h +++ b/server/mpm/mpmt_beos/scoreboard.h @@ -67,11 +67,11 @@ extern "C" { #include "mpm_default.h" /* For HARD_.*_LIMIT */ API_EXPORT(int) ap_exists_scoreboard_image(void); -void reinit_scoareboard(ap_context_t *p); +void reinit_scoareboard(ap_pool_t *p); void cleanup_scoreboard(void); void ap_mpmt_beos_set_maintain_connection_status(int flag); void ap_mpmt_beos_force_reset_connection_status(long conn_id); -void reinit_scoreboard(ap_context_t *p); +void reinit_scoreboard(ap_pool_t *p); void update_scoreboard_global(void); API_EXPORT(int) find_child_by_pid(int pid); int ap_update_child_status(int child_num, int thread_num, int status, request_rec *r); diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index 5e0a745d80..ee0025c6a1 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -104,7 +104,7 @@ typedef struct { int pid; int tid; int sd; - ap_context_t *tpool; /* "pthread" would be confusing */ + ap_pool_t *tpool; /* "pthread" would be confusing */ } proc_info; /* @@ -140,8 +140,8 @@ static int one_process = 0; int raise_sigstop_flags; #endif -static ap_context_t *pconf; /* Pool for config stuff */ -static ap_context_t *pchild; /* Pool for httpd child stuff */ +static ap_pool_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pchild; /* Pool for httpd child stuff */ static int my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ @@ -589,7 +589,7 @@ int ap_graceful_stop_signalled(void) * Child process main loop. */ -static void process_socket(ap_context_t *p, ap_socket_t *sock, int my_child_num, int my_thread_num) +static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, int my_thread_num) { BUFF *conn_io; conn_rec *current_conn; @@ -655,9 +655,9 @@ static void * worker_thread(void * dummy) proc_info * ti = dummy; int process_slot = ti->pid; int thread_slot = ti->tid; - ap_context_t *tpool = ti->tpool; + ap_pool_t *tpool = ti->tpool; ap_socket_t *csd = NULL; - ap_context_t *ptrans; /* Pool for per-transaction stuff */ + ap_pool_t *ptrans; /* Pool for per-transaction stuff */ ap_socket_t *sd = NULL; int n; int curr_pollfd, last_pollfd = 0; @@ -666,7 +666,7 @@ static void * worker_thread(void * dummy) free(ti); - ap_create_context(&ptrans, tpool); + ap_create_pool(&ptrans, tpool); pthread_mutex_lock(&worker_thread_count_mutex); worker_thread_count++; @@ -804,7 +804,7 @@ static void child_main(int child_num_arg) my_pid = getpid(); - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); /*stuff to do before we switch id's, so we have permissions.*/ reopen_scoreboard(pchild); @@ -860,7 +860,7 @@ static void child_main(int child_num_arg) my_info->pid = my_child_num; my_info->tid = i; my_info->sd = 0; - ap_create_context(&my_info->tpool, pchild); + ap_create_pool(&my_info->tpool, pchild); /* We are creating threads right now */ (void) ap_update_child_status(my_child_num, i, SERVER_STARTING, @@ -1172,7 +1172,7 @@ static void server_main_loop(int remaining_children_to_start) } } -int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) +int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) { int remaining_children_to_start; ap_status_t rv; @@ -1342,7 +1342,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) return 0; } -static void mpmt_pthread_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) +static void mpmt_pthread_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp) { static int restart_num = 0; diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c index 7056d985fa..f112c5ce58 100644 --- a/server/mpm/mpmt_pthread/scoreboard.c +++ b/server/mpm/mpmt_pthread/scoreboard.c @@ -94,7 +94,7 @@ static ap_status_t cleanup_shared_mem(void *d) ap_shm_destroy(scoreboard_shm); } -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { char buf[512]; const char *fname; @@ -119,13 +119,13 @@ static void setup_shared_mem(ap_context_t *p) ap_scoreboard_image->global.running_generation = 0; } -void reopen_scoreboard(ap_context_t *p) +void reopen_scoreboard(ap_pool_t *p) { } #endif /* APR_SHARED_MEM */ /* Called by parent process */ -void reinit_scoreboard(ap_context_t *p) +void reinit_scoreboard(ap_pool_t *p) { int running_gen = 0; if (ap_scoreboard_image) @@ -331,7 +331,7 @@ const char *ap_get_connection_status(long conn_id, const char *key) return NULL; } -ap_array_header_t *ap_get_connections(ap_context_t *p) +ap_array_header_t *ap_get_connections(ap_pool_t *p) { int i; ap_array_header_t *connection_list; @@ -351,7 +351,7 @@ ap_array_header_t *ap_get_connections(ap_context_t *p) return connection_list; } -ap_array_header_t *ap_get_connection_keys(ap_context_t *p, long conn_id) +ap_array_header_t *ap_get_connection_keys(ap_pool_t *p, long conn_id) { int i = 0; status_table_entry *ss; @@ -401,7 +401,7 @@ void ap_update_connection_status(long conn_id, const char *key, return; } -ap_array_header_t *ap_get_status_table(ap_context_t *p) +ap_array_header_t *ap_get_status_table(ap_pool_t *p) { int i, j; ap_array_header_t *server_status; diff --git a/server/mpm/mpmt_pthread/scoreboard.h b/server/mpm/mpmt_pthread/scoreboard.h index 9af5cf8649..4cdf5b56b0 100644 --- a/server/mpm/mpmt_pthread/scoreboard.h +++ b/server/mpm/mpmt_pthread/scoreboard.h @@ -216,7 +216,7 @@ typedef struct { #endif API_EXPORT(int) ap_exists_scoreboard_image(void); -void reinit_scoareboard(ap_context_t *p); +void reinit_scoareboard(ap_pool_t *p); void cleanup_scoreboard(void); API_EXPORT(void) ap_sync_scoreboard_image(void); void ap_mpmt_pthread_force_reset_connection_status(long conn_id); @@ -228,10 +228,10 @@ caddr_t get_shared_heap(const char *Name); #elif defined(USE_POSIX_SCOREBOARD) static void cleanup_shared_mem(void *d); #else -void reinit_scoreboard(ap_context_t *p); +void reinit_scoreboard(ap_pool_t *p); #endif -API_EXPORT(void) reopen_scoreboard(ap_context_t *p); +API_EXPORT(void) reopen_scoreboard(ap_pool_t *p); ap_inline void ap_sync_scoreboard_image(void); void increment_counts(int child_num, int thread_num, request_rec *r); diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 50ab81c717..23509ff38c 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -158,8 +158,8 @@ static int listenmaxfd; static int one_process = 0; -static ap_context_t *pconf; /* Pool for config stuff */ -static ap_context_t *pchild; /* Pool for httpd child stuff */ +static ap_pool_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pchild; /* Pool for httpd child stuff */ static int my_pid; /* it seems silly to call getpid all the time */ #ifndef MULTITHREAD @@ -226,7 +226,7 @@ static void clean_child_exit(int code) } #if defined(USE_FCNTL_SERIALIZED_ACCEPT) || defined(USE_FLOCK_SERIALIZED_ACCEPT) -static void expand_lock_fname(ap_context_t *p) +static void expand_lock_fname(ap_pool_t *p) { /* XXXX possibly bogus cast */ ap_lock_fname = ap_psprintf(p, "%s.%lu", @@ -242,7 +242,7 @@ static ulock_t uslock = NULL; #define accept_mutex_child_init(x) -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { ptrdiff_t old; usptr_t *us; @@ -320,7 +320,7 @@ static void accept_mutex_child_cleanup(void *foo) } } -static void accept_mutex_child_init(ap_context_t *p) +static void accept_mutex_child_init(ap_pool_t *p) { ap_register_cleanup(p, NULL, accept_mutex_child_cleanup, ap_null_cleanup); } @@ -334,7 +334,7 @@ static void accept_mutex_cleanup(void *foo) accept_mutex = (void *)(caddr_t)-1; } -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { pthread_mutexattr_t mattr; int fd; @@ -453,7 +453,7 @@ static void accept_mutex_cleanup(void *foo) #define accept_mutex_child_init(x) -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { union semun ick; struct semid_ds buf; @@ -525,7 +525,7 @@ static int lock_fd = -1; * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { ap_file_t *tempfile = NULL; lock_it.l_whence = SEEK_SET; /* from current point */ @@ -600,7 +600,7 @@ static ap_status_t accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(ap_context_t *p) +static void accept_mutex_child_init(ap_pool_t *p) { ap_file_t *tempfile = NULL; ap_status_t ret; @@ -618,7 +618,7 @@ static void accept_mutex_child_init(ap_context_t *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { ap_file_t *tempfile = NULL; ap_status_t ret; @@ -673,7 +673,7 @@ static void accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(ap_context_t *p) +static void accept_mutex_child_init(ap_pool_t *p) { int rc = DosOpenMutexSem(NULL, &lock_sem); @@ -690,7 +690,7 @@ static void accept_mutex_child_init(ap_context_t *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE); @@ -737,7 +737,7 @@ static void accept_mutex_cleanup(void *foo) #define accept_mutex_init(x) -static void accept_mutex_child_init(ap_context_t *p) +static void accept_mutex_child_init(ap_pool_t *p) { ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup); tpf_core_held = 0; @@ -796,7 +796,7 @@ static ap_status_t cleanup_shared_mem(void *d) return APR_SUCCESS; } -static void setup_shared_mem(ap_context_t *p) +static void setup_shared_mem(ap_pool_t *p) { char buf[512]; const char *fname; @@ -821,13 +821,13 @@ static void setup_shared_mem(ap_context_t *p) ap_scoreboard_image->global.running_generation = 0; } -static void reopen_scoreboard(ap_context_t *p) +static void reopen_scoreboard(ap_pool_t *p) { } #endif /* Called by parent process */ -static void reinit_scoreboard(ap_context_t *p) +static void reinit_scoreboard(ap_pool_t *p) { int running_gen = 0; if (ap_scoreboard_image) @@ -1405,7 +1405,7 @@ static void child_main(int child_num_arg) ap_listen_rec *lr; ap_listen_rec *last_lr; ap_listen_rec *first_lr; - ap_context_t *ptrans; + ap_pool_t *ptrans; conn_rec *current_conn; ap_iol *iol; ap_status_t stat; @@ -1420,9 +1420,9 @@ static void child_main(int child_num_arg) /* Get a sub context for global allocations in this child, so that * we can have cleanups occur when the child exits. */ - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); - ap_create_context(&ptrans, pchild); + ap_create_pool(&ptrans, pchild); /* needs to be done before we switch UIDs so we have permissions */ reopen_scoreboard(pchild); @@ -2034,7 +2034,7 @@ void ap_reset_connection_status(long conn_id) * Executive routines. */ -int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) +int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) { int remaining_children_to_start; @@ -2247,7 +2247,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) return 0; } -static void prefork_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp) +static void prefork_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp) { static int restart_num = 0; @@ -2445,7 +2445,7 @@ const char *ap_get_connection_status(long conn_id, const char *key) return NULL; } -ap_array_header_t *ap_get_connections(ap_context_t *p) +ap_array_header_t *ap_get_connections(ap_pool_t *p) { int i; ap_array_header_t *connection_list; @@ -2464,7 +2464,7 @@ ap_array_header_t *ap_get_connections(ap_context_t *p) return connection_list; } -ap_array_header_t *ap_get_connection_keys(ap_context_t *p, long conn_id) +ap_array_header_t *ap_get_connection_keys(ap_pool_t *p, long conn_id) { int i = 0; status_table_entry *ss; @@ -2516,7 +2516,7 @@ void ap_update_connection_status(long conn_id, const char *key, return; } -ap_array_header_t *ap_get_status_table(ap_context_t *p) +ap_array_header_t *ap_get_status_table(ap_pool_t *p) { int i, j; ap_array_header_t *server_status; diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index 1ea16e9f5a..380ca95fbe 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -128,12 +128,12 @@ struct other_child_rec { static other_child_rec *other_children; #endif -static ap_context_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pconf; /* Pool for config stuff */ static scoreboard *ap_scoreboard_image = NULL; struct thread_globals { int child_num; - ap_context_t *pchild; /* Pool for httpd child stuff */ + ap_pool_t *pchild; /* Pool for httpd child stuff */ int usr1_just_die; }; @@ -142,7 +142,7 @@ static struct thread_globals **ppthread_globals = NULL; #define THREAD_GLOBAL(gvar) ((*ppthread_globals)->gvar) -void reinit_scoreboard(ap_context_t *p) +void reinit_scoreboard(ap_pool_t *p) { if (ap_scoreboard_image == NULL) { ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE); @@ -190,7 +190,7 @@ static ap_status_t accept_mutex_cleanup(void *foo) * Initialize mutex lock. * Done by each child at it's birth */ -static void accept_mutex_child_init(ap_context_t *p) +static void accept_mutex_child_init(ap_pool_t *p) { int rc = DosOpenMutexSem(NULL, &lock_sem); @@ -207,7 +207,7 @@ static void accept_mutex_child_init(ap_context_t *p) * Initialize mutex lock. * Must be safe to call this on a restart. */ -static void accept_mutex_init(ap_context_t *p) +static void accept_mutex_init(ap_pool_t *p) { int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE); @@ -878,7 +878,7 @@ int ap_graceful_stop_signalled(void) -static int setup_listeners(ap_context_t *pchild, ap_pollfd_t **listen_poll) +static int setup_listeners(ap_pool_t *pchild, ap_pollfd_t **listen_poll) { ap_listen_rec *lr; int numfds = 0; @@ -901,10 +901,10 @@ static void child_main(void *child_num_arg) { ap_listen_rec *lr = NULL; ap_listen_rec *first_lr = NULL; - ap_context_t *ptrans; + ap_pool_t *ptrans; conn_rec *current_conn; ap_iol *iol; - ap_context_t *pchild; + ap_pool_t *pchild; parent_score *sc_parent_rec; int requests_this_child = 0; ap_pollfd_t *listen_poll; @@ -924,12 +924,12 @@ static void child_main(void *child_num_arg) /* Get a sub pool for global allocations in this child, so that * we can have cleanups occur when the child exits. */ - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); *ppthread_globals = (struct thread_globals *)ap_palloc(pchild, sizeof(struct thread_globals)); THREAD_GLOBAL(child_num) = (int)child_num_arg; sc_parent_rec = ap_scoreboard_image->parent + THREAD_GLOBAL(child_num); THREAD_GLOBAL(pchild) = pchild; - ap_create_context(&ptrans, pchild); + ap_create_pool(&ptrans, pchild); if (setup_listeners(pchild, &listen_poll)) { clean_child_exit(1); @@ -1392,7 +1392,7 @@ static void process_child_status(int tid, ap_wait_t status) * Executive routines. */ -int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) +int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s) { int remaining_children_to_start; int i; @@ -1612,7 +1612,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) return 0; } -static void spmt_os2_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) +static void spmt_os2_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp) { one_process = !!getenv("ONE_PROCESS"); diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 4168c0b580..0974be9b33 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -86,7 +86,7 @@ static struct fd_set listenfds; static int num_listenfds = 0; static SOCKET listenmaxfd = INVALID_SOCKET; -static ap_context_t *pconf; /* Pool for config stuff */ +static ap_pool_t *pconf; /* Pool for config stuff */ static char ap_coredump_dir[MAX_STRING_LEN]; @@ -760,7 +760,7 @@ static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context) "win9x_get_connection: ap_pcalloc() failed. Process will exit."); return NULL; } - ap_create_context(&context->ptrans, pconf); + ap_create_pool(&context->ptrans, pconf); } @@ -837,7 +837,7 @@ static void drain_acceptex_complport(HANDLE hComplPort, BOOLEAN bCleanUp) } } } -static int create_acceptex_context(ap_context_t *_pconf, ap_listen_rec *lr) +static int create_acceptex_context(ap_pool_t *_pconf, ap_listen_rec *lr) { PCOMP_CONTEXT context; DWORD BytesRead; @@ -866,7 +866,7 @@ static int create_acceptex_context(ap_context_t *_pconf, ap_listen_rec *lr) "create_acceptex_context: socket() failed. Process will exit."); return -1; } - ap_create_context(&context->ptrans, _pconf); + ap_create_pool(&context->ptrans, _pconf); context->conn_io = ap_bcreate(context->ptrans, B_RDWR); context->recv_buf = context->conn_io->inbase; context->recv_buf_size = context->conn_io->bufsiz - 2*PADDED_ADDR_SIZE; @@ -1148,7 +1148,7 @@ static void child_main() ap_status_t status; time_t end_time; int i; - ap_context_t *pchild; + ap_pool_t *pchild; /* This is the child process or we are running in single process * mode. @@ -1177,7 +1177,7 @@ static void child_main() ap_assert(start_mutex); ap_assert(exit_event); - ap_create_context(&pchild, pconf); + ap_create_pool(&pchild, pconf); if (listenmaxfd == INVALID_SOCKET) { @@ -1336,7 +1336,7 @@ static void cleanup_process(HANDLE *handles, HANDLE *events, int position, int * (*processes)--; } -static int create_process(ap_context_t *p, HANDLE *handles, HANDLE *events, int *processes) +static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *processes) { int rv; @@ -1631,7 +1631,7 @@ die_now: /* * winnt_pre_config() hook */ -static void winnt_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp) +static void winnt_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp) { char *pid; @@ -1663,12 +1663,12 @@ static void winnt_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context } -static void winnt_post_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec* server_conf) +static void winnt_post_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp, server_rec* server_conf) { server_conf = server_conf; } -API_EXPORT(int) ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s ) +API_EXPORT(int) ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s ) { static int restart = 0; /* Default is "not a restart" */ // time_t tmstart; @@ -1876,7 +1876,7 @@ API_EXPORT(void) ap_reset_connection_status(long conn_id) /* NOP */ } -API_EXPORT(ap_array_header_t *) ap_get_status_table(ap_context_t *p) +API_EXPORT(ap_array_header_t *) ap_get_status_table(ap_pool_t *p) { /* NOP */ return NULL; diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h index 937cbe65c3..ca1b3c67a9 100644 --- a/server/mpm/winnt/mpm_winnt.h +++ b/server/mpm/winnt/mpm_winnt.h @@ -73,7 +73,7 @@ typedef struct CompContext { BUFF *conn_io; char *recv_buf; int recv_buf_size; - ap_context_t *ptrans; + ap_pool_t *ptrans; struct sockaddr *sa_server; int sa_server_len; struct sockaddr *sa_client; diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c index 4ce55d9924..f5313464a1 100644 --- a/server/mpm/winnt/registry.c +++ b/server/mpm/winnt/registry.c @@ -126,13 +126,13 @@ * * If ppValue is NULL, allocate space for the value and return it in * *pValue. The return value is the number of bytes in the value. - * The first argument is the ap_context_t to use to allocate space for the value. + * The first argument is the ap_pool_t to use to allocate space for the value. * * If pValue is not NULL, assume it is a buffer of nSizeValue bytes, * and write the value into the buffer. The return value is the number * of bytes in the value (so if the return value is greater than * the supplied nSizeValue, the caller knows that *pValue is truncated). - * The ap_context_t argument is ignored. + * The ap_pool_t argument is ignored. * * The return value is the number of bytes in the successfully retreived * key if everything worked, or: @@ -149,7 +149,7 @@ * message will be logged at priority "warning". */ -static int ap_registry_get_key_int(ap_context_t *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue) +static int ap_registry_get_key_int(ap_pool_t *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue) { long rv; HKEY hKey; @@ -256,7 +256,7 @@ static int ap_registry_get_key_int(ap_context_t *p, char *key, char *name, char * an error getting the key. */ #if 0 -int ap_registry_get_server_root(ap_context_t *p, char *dir, int size) +int ap_registry_get_server_root(ap_pool_t *p, char *dir, int size) { int rv; @@ -268,7 +268,7 @@ int ap_registry_get_server_root(ap_context_t *p, char *dir, int size) return (rv < -1) ? -1 : 0; } #else -int ap_registry_get_server_root(ap_context_t *p, char **buf) +int ap_registry_get_server_root(ap_pool_t *p, char **buf) { int rv; @@ -291,7 +291,7 @@ char *ap_get_service_key(char *service_name) return(key); } #if 0 -int ap_registry_get_service_conf(ap_context_t *p, char *dir, int size, char *service_name) +int ap_registry_get_service_conf(ap_pool_t *p, char *dir, int size, char *service_name) { int rv; char *key = ap_get_service_key(service_name); @@ -305,7 +305,7 @@ int ap_registry_get_service_conf(ap_context_t *p, char *dir, int size, char *ser return (rv < -1) ? -1 : 0; } #else -int ap_registry_get_service_conf(ap_context_t *p, char **buf, char *service_name) +int ap_registry_get_service_conf(ap_pool_t *p, char **buf, char *service_name) { int rv; char *key = ap_get_service_key(service_name); diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c index 6f53312c60..de0663edee 100644 --- a/server/mpm/winnt/service.c +++ b/server/mpm/winnt/service.c @@ -130,9 +130,9 @@ void __stdcall service_main_fn(DWORD argc, LPTSTR *argv) char **new, *server_root, *tmp; char *server_confname = SERVER_CONFIG_FILE; ap_array_header_t *cmdtbl; - ap_context_t *pwincmd; + ap_pool_t *pwincmd; - ap_create_context(&pwincmd, NULL); + ap_create_pool(&pwincmd, NULL); if (pwincmd == NULL) { exit(0); } diff --git a/server/util.c b/server/util.c index 0827a326d9..3e9eb6a2a1 100644 --- a/server/util.c +++ b/server/util.c @@ -101,7 +101,7 @@ extern int fclose(FILE *); * Examine a field value (such as a media-/content-type) string and return * it sans any parameters; e.g., strip off any ';charset=foo' and the like. */ -API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype) +API_EXPORT(char *) ap_field_noparam(ap_pool_t *p, const char *intype) { const char *semi; @@ -119,7 +119,7 @@ API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype) } } -API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t t, const char *fmt, int gmt) +API_EXPORT(char *) ap_ht_time(ap_pool_t *p, ap_time_t t, const char *fmt, int gmt) { ap_size_t retcode; char ts[MAX_STRING_LEN]; @@ -256,7 +256,7 @@ static ap_status_t regex_cleanup(void *preg) return APR_SUCCESS; } -API_EXPORT(regex_t *) ap_pregcomp(ap_context_t *p, const char *pattern, +API_EXPORT(regex_t *) ap_pregcomp(ap_pool_t *p, const char *pattern, int cflags) { regex_t *preg = ap_palloc(p, sizeof(regex_t)); @@ -270,7 +270,7 @@ API_EXPORT(regex_t *) ap_pregcomp(ap_context_t *p, const char *pattern, return preg; } -API_EXPORT(void) ap_pregfree(ap_context_t *p, regex_t * reg) +API_EXPORT(void) ap_pregfree(ap_pool_t *p, regex_t * reg) { ap_block_alarms(); regfree(reg); @@ -342,7 +342,7 @@ API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, s * AT&T V8 regexp package. */ -API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source, +API_EXPORT(char *) ap_pregsub(ap_pool_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[]) { const char *src = input; @@ -529,7 +529,7 @@ API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n) /* * return the parent directory name including trailing / of the file s */ -API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s) +API_EXPORT(char *) ap_make_dirstr_parent(ap_pool_t *p, const char *s) { char *last_slash = strrchr(s, '/'); char *d; @@ -551,7 +551,7 @@ API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s) * This function is deprecated. Use one of the preceeding two functions * which are faster. */ -API_EXPORT(char *) ap_make_dirstr(ap_context_t *p, const char *s, int n) +API_EXPORT(char *) ap_make_dirstr(ap_pool_t *p, const char *s, int n) { register int x, f; char *res; @@ -602,12 +602,12 @@ API_EXPORT(void) ap_chdir_file(const char *file) * error... ah well. */ } -API_EXPORT(char *) ap_getword_nc(ap_context_t *atrans, char **line, char stop) +API_EXPORT(char *) ap_getword_nc(ap_pool_t *atrans, char **line, char stop) { return ap_getword(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword(ap_context_t *atrans, const char **line, char stop) +API_EXPORT(char *) ap_getword(ap_pool_t *atrans, const char **line, char stop) { char *pos = strchr(*line, stop); char *res; @@ -629,12 +629,12 @@ API_EXPORT(char *) ap_getword(ap_context_t *atrans, const char **line, char stop return res; } -API_EXPORT(char *) ap_getword_white_nc(ap_context_t *atrans, char **line) +API_EXPORT(char *) ap_getword_white_nc(ap_pool_t *atrans, char **line) { return ap_getword_white(atrans, (const char **) line); } -API_EXPORT(char *) ap_getword_white(ap_context_t *atrans, const char **line) +API_EXPORT(char *) ap_getword_white(ap_pool_t *atrans, const char **line) { int pos = -1, x; char *res; @@ -663,12 +663,12 @@ API_EXPORT(char *) ap_getword_white(ap_context_t *atrans, const char **line) return res; } -API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *atrans, char **line, char stop) +API_EXPORT(char *) ap_getword_nulls_nc(ap_pool_t *atrans, char **line, char stop) { return ap_getword_nulls(atrans, (const char **) line, stop); } -API_EXPORT(char *) ap_getword_nulls(ap_context_t *atrans, const char **line, char stop) +API_EXPORT(char *) ap_getword_nulls(ap_pool_t *atrans, const char **line, char stop) { char *pos = strchr(*line, stop); char *res; @@ -692,7 +692,7 @@ API_EXPORT(char *) ap_getword_nulls(ap_context_t *atrans, const char **line, cha * all honored */ -static char *substring_conf(ap_context_t *p, const char *start, int len, char quote) +static char *substring_conf(ap_pool_t *p, const char *start, int len, char quote) { char *result = ap_palloc(p, len + 2); char *resp = result; @@ -714,12 +714,12 @@ static char *substring_conf(ap_context_t *p, const char *start, int len, char qu #endif } -API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line) +API_EXPORT(char *) ap_getword_conf_nc(ap_pool_t *p, char **line) { return ap_getword_conf(p, (const char **) line); } -API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line) +API_EXPORT(char *) ap_getword_conf(ap_pool_t *p, const char **line) { const char *str = *line, *strend; char *res; @@ -767,7 +767,7 @@ API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line) * empty string. Any unrecognized construct is not * replaced and silently ignored. */ -API_EXPORT(char *) ap_resolve_env(ap_context_t *p, const char * word) +API_EXPORT(char *) ap_resolve_env(ap_pool_t *p, const char * word) { char tmp[ MAX_STRING_LEN ]; char * s, * e; @@ -828,7 +828,7 @@ static void *cfg_getstr(void *buf, size_t bufsiz, void *param) } /* Open a configfile_t as FILE, return open configfile_t struct pointer */ -API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, ap_context_t *p, const char *name) +API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, ap_pool_t *p, const char *name) { configfile_t *new_cfg; ap_file_t *file = NULL; @@ -889,7 +889,7 @@ API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, ap_context_t *p /* Allocate a configfile_t handle with user defined functions and params */ -API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr, +API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_pool_t *p, const char *descr, void *param, int(*getch)(void *param), void *(*getstr) (void *buf, size_t bufsiz, void *param), @@ -1120,7 +1120,7 @@ API_EXPORT(const char *) ap_size_list_item(const char **field, int *len) * the converted list item (or NULL if none) and the address pointed to by * field is shifted to the next non-comma, non-whitespace. */ -API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field) +API_EXPORT(char *) ap_get_list_item(ap_pool_t *p, const char **field) { const char *tok_start; const unsigned char *ptr; @@ -1209,7 +1209,7 @@ API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field) * This would be much more efficient if we stored header fields as * an array of list items as they are received instead of a plain string. */ -API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_list_item(ap_pool_t *p, const char *line, const char *tok) { const unsigned char *pos; const unsigned char *ptr = (const unsigned char *)line; @@ -1312,7 +1312,7 @@ API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char * by whitespace at the caller's option. */ -API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white) +API_EXPORT(char *) ap_get_token(ap_pool_t *p, const char **accept_line, int accept_white) { const char *ptr = *accept_line; const char *tok_start; @@ -1352,7 +1352,7 @@ API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int a /* find http tokens, see the definition of token from RFC2068 */ -API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_token(ap_pool_t *p, const char *line, const char *tok) { const unsigned char *start_token; const unsigned char *s; @@ -1386,7 +1386,7 @@ API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok } -API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok) +API_EXPORT(int) ap_find_last_token(ap_pool_t *p, const char *line, const char *tok) { int llen, tlen, lidx; @@ -1404,7 +1404,7 @@ API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char return (strncasecmp(&line[lidx], tok, tlen) == 0); } -API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *str) +API_EXPORT(char *) ap_escape_shell_cmd(ap_pool_t *p, const char *str) { char *cmd; unsigned char *d; @@ -1502,7 +1502,7 @@ API_EXPORT(int) ap_unescape_url(char *url) return OK; } -API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname, +API_EXPORT(char *) ap_construct_server(ap_pool_t *p, const char *hostname, unsigned port, const request_rec *r) { if (ap_is_default_port(port, r)) @@ -1547,7 +1547,7 @@ static ap_inline unsigned char *c2x(unsigned what, unsigned char *where) * something with a '/' in it (and thus does not prefix "./"). */ -API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *segment) +API_EXPORT(char *) ap_escape_path_segment(ap_pool_t *p, const char *segment) { char *copy = ap_palloc(p, 3 * strlen(segment) + 1); const unsigned char *s = (const unsigned char *)segment; @@ -1567,7 +1567,7 @@ API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *segment) return copy; } -API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial) +API_EXPORT(char *) ap_os_escape_path(ap_pool_t *p, const char *path, int partial) { char *copy = ap_palloc(p, 3 * strlen(path) + 3); const unsigned char *s = (const unsigned char *)path; @@ -1598,7 +1598,7 @@ API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int part /* ap_escape_uri is now a macro for os_escape_path */ -API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s) +API_EXPORT(char *) ap_escape_html(ap_pool_t *p, const char *s) { int i, j; char *x; @@ -1644,7 +1644,7 @@ API_EXPORT(int) ap_is_directory(const char *path) return (S_ISDIR(finfo.st_mode)); } -API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *src1, +API_EXPORT(char *) ap_make_full_path(ap_pool_t *a, const char *src1, const char *src2) { register int x; @@ -1933,7 +1933,7 @@ unsigned long ap_get_virthost_addr(char *w, unsigned short *ports) } -static char *find_fqdn(ap_context_t *a, struct hostent *p) +static char *find_fqdn(ap_pool_t *a, struct hostent *p) { int x; @@ -1948,7 +1948,7 @@ static char *find_fqdn(ap_context_t *a, struct hostent *p) return ap_pstrdup(a, (void *) p->h_name); } -char *ap_get_local_host(ap_context_t *a) +char *ap_get_local_host(ap_pool_t *a) { #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 @@ -1981,7 +1981,7 @@ char *ap_get_local_host(ap_context_t *a) /* simple 'pool' alloc()ing glue to ap_base64.c */ -API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded) +API_EXPORT(char *) ap_pbase64decode(ap_pool_t *p, const char *bufcoded) { char *decoded; int l; @@ -1993,7 +1993,7 @@ API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded) return decoded; } -API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string) +API_EXPORT(char *) ap_pbase64encode(ap_pool_t *p, char *string) { char *encoded; int l = strlen(string); @@ -2007,12 +2007,12 @@ API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string) /* deprecated names for the above two functions, here for compatibility */ -API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded) +API_EXPORT(char *) ap_uudecode(ap_pool_t *p, const char *bufcoded) { return ap_pbase64decode(p, bufcoded); } -API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string) +API_EXPORT(char *) ap_uuencode(ap_pool_t *p, char *string) { return ap_pbase64encode(p, string); } @@ -2057,7 +2057,7 @@ API_EXPORT(void) ap_content_type_tolower(char *str) /* * Given a string, replace any bare " with \" . */ -API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring) +API_EXPORT(char *) ap_escape_quotes (ap_pool_t *p, const char *instring) { int newlen = 0; const char *inchr = instring; diff --git a/server/util_md5.c b/server/util_md5.c index f16f54c35d..8af5cc6162 100644 --- a/server/util_md5.c +++ b/server/util_md5.c @@ -90,7 +90,7 @@ #include "httpd.h" #include "util_md5.h" -API_EXPORT(char *) ap_md5_binary(ap_context_t *p, const unsigned char *buf, int length) +API_EXPORT(char *) ap_md5_binary(ap_pool_t *p, const unsigned char *buf, int length) { const char *hex = "0123456789abcdef"; AP_MD5_CTX my_md5; @@ -115,7 +115,7 @@ API_EXPORT(char *) ap_md5_binary(ap_context_t *p, const unsigned char *buf, int return ap_pstrdup(p, result); } -API_EXPORT(char *) ap_md5(ap_context_t *p, const unsigned char *string) +API_EXPORT(char *) ap_md5(ap_pool_t *p, const unsigned char *string) { return ap_md5_binary(p, string, (int) strlen((char *)string)); } @@ -165,7 +165,7 @@ API_EXPORT(char *) ap_md5(ap_context_t *p, const unsigned char *string) static char basis_64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -API_EXPORT(char *) ap_md5contextTo64(ap_context_t *a, AP_MD5_CTX * context) +API_EXPORT(char *) ap_md5contextTo64(ap_pool_t *a, AP_MD5_CTX * context) { unsigned char digest[18]; char *encodedDigest; @@ -192,7 +192,7 @@ API_EXPORT(char *) ap_md5contextTo64(ap_context_t *a, AP_MD5_CTX * context) #ifdef CHARSET_EBCDIC -API_EXPORT(char *) ap_md5digest(ap_context_t *p, ap_file_t *infile, int convert) +API_EXPORT(char *) ap_md5digest(ap_pool_t *p, ap_file_t *infile, int convert) { AP_MD5_CTX context; unsigned char buf[1000]; @@ -214,7 +214,7 @@ API_EXPORT(char *) ap_md5digest(ap_context_t *p, ap_file_t *infile, int convert) #else -API_EXPORT(char *) ap_md5digest(ap_context_t *p, ap_file_t *infile) +API_EXPORT(char *) ap_md5digest(ap_pool_t *p, ap_file_t *infile) { AP_MD5_CTX context; unsigned char buf[1000]; diff --git a/server/util_script.c b/server/util_script.c index 162dedf664..96d0796053 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -99,7 +99,7 @@ * are handled in create_argv. * */ -static char **create_argv(ap_context_t *p, char *path, char *user, char *group, +static char **create_argv(ap_pool_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; @@ -142,7 +142,7 @@ static char **create_argv(ap_context_t *p, char *path, char *user, char *group, } #endif /* defined(OS2) || defined(WIN32) */ -static char *http2env(ap_context_t *a, char *w) +static char *http2env(ap_pool_t *a, char *w) { char *res = ap_pstrcat(a, "HTTP_", w, NULL); char *cp = res; @@ -159,7 +159,7 @@ static char *http2env(ap_context_t *a, char *w) return res; } -API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t) +API_EXPORT(char **) ap_create_environment(ap_pool_t *p, ap_table_t *t) { ap_array_header_t *env_arr = ap_table_elts(t); ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts; @@ -667,7 +667,7 @@ API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r) } #if defined(OS2) || defined(WIN32) -static char **create_argv_cmd(ap_context_t *p, char *av0, const char *args, char *path) +static char **create_argv_cmd(ap_pool_t *p, char *av0, const char *args, char *path) { register int x, n; char **av; diff --git a/server/util_uri.c b/server/util_uri.c index 858323aa49..7a6320906a 100644 --- a/server/util_uri.c +++ b/server/util_uri.c @@ -107,7 +107,7 @@ API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r) * from a call to gethostbyname() and lives in static storage. * By creating a copy we can tuck it away for later use. */ -API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp) +API_EXPORT(struct hostent *) ap_pduphostent(ap_pool_t *p, const struct hostent *hp) { struct hostent *newent; char **ptrs; @@ -160,7 +160,7 @@ API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hosten * COPY OF the hostent structure, intended to be stored and used later. * (gethostbyname() uses static storage that would be overwritten on each call) */ -API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname) +API_EXPORT(struct hostent *) ap_pgethostbyname(ap_pool_t *p, const char *hostname) { struct hostent *hp = gethostbyname(hostname); return (hp == NULL) ? NULL : ap_pduphostent(p, hp); @@ -170,7 +170,7 @@ API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *host /* Unparse a uri_components structure to an URI string. * Optionally suppress the password for security reasons. */ -API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr, unsigned flags) +API_EXPORT(char *) ap_unparse_uri_components(ap_pool_t *p, const uri_components *uptr, unsigned flags) { char *ret = ""; @@ -302,7 +302,7 @@ void ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr) +API_EXPORT(int) ap_parse_uri_components(ap_pool_t *p, const char *uri, uri_components *uptr) { int ret; regmatch_t match[10]; /* This must have at least as much elements @@ -444,7 +444,7 @@ void ap_util_uri_init(void) * - fills in fields of uri_components *uptr * - none on any of the r->* fields */ -API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr) +API_EXPORT(int) ap_parse_uri_components(ap_pool_t *p, const char *uri, uri_components *uptr) { const char *s; const char *s1; @@ -568,7 +568,7 @@ deal_with_host: * currently at http://www.mcom.com/newsref/std/tunneling_ssl.html * for the format of the "CONNECT host:port HTTP/1.0" request */ -API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr) +API_EXPORT(int) ap_parse_hostinfo_components(ap_pool_t *p, const char *hostinfo, uri_components *uptr) { const char *s; char *endstr; diff --git a/server/vhost.c b/server/vhost.c index 312466049b..8e1158cd38 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -150,7 +150,7 @@ static server_addr_rec **name_vhost_list_tail; /* called at the beginning of the config */ -void ap_init_vhost_config(ap_context_t *p) +void ap_init_vhost_config(ap_pool_t *p) { memset(iphash_table, 0, sizeof(iphash_table)); default_list = NULL; @@ -166,7 +166,7 @@ void ap_init_vhost_config(ap_context_t *p) * *paddr is the variable used to keep track of **paddr between calls * port is the default port to assume */ -static const char *get_addresses(ap_context_t *p, char *w, server_addr_rec ***paddr, +static const char *get_addresses(ap_pool_t *p, char *w, server_addr_rec ***paddr, unsigned port) { struct hostent *hep; @@ -243,7 +243,7 @@ static const char *get_addresses(ap_context_t *p, char *w, server_addr_rec ***pa /* parse the <VirtualHost> addresses */ -const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s) +const char *ap_parse_vhost_addrs(ap_pool_t *p, const char *hostname, server_rec *s) { server_addr_rec **addrs; const char *err; @@ -348,7 +348,7 @@ static ap_inline unsigned hash_inaddr(unsigned key) -static ipaddr_chain *new_ipaddr_chain(ap_context_t *p, +static ipaddr_chain *new_ipaddr_chain(ap_pool_t *p, server_rec *s, server_addr_rec *sar) { ipaddr_chain *new; @@ -362,7 +362,7 @@ static ipaddr_chain *new_ipaddr_chain(ap_context_t *p, } -static name_chain *new_name_chain(ap_context_t *p, server_rec *s, server_addr_rec *sar) +static name_chain *new_name_chain(ap_pool_t *p, server_rec *s, server_addr_rec *sar) { name_chain *new; @@ -469,7 +469,7 @@ static void dump_vhost_config(ap_file_t *f) } /* compile the tables and such we need to do the run-time vhost lookups */ -void ap_fini_vhost_config(ap_context_t *p, server_rec *main_s) +void ap_fini_vhost_config(ap_pool_t *p, server_rec *main_s) { server_addr_rec *sar; int has_default_vhost_addr; diff --git a/srclib/expat-lite/xmlparse.h b/srclib/expat-lite/xmlparse.h index 0fdfa75a4e..1130cdd5b3 100644 --- a/srclib/expat-lite/xmlparse.h +++ b/srclib/expat-lite/xmlparse.h @@ -246,7 +246,7 @@ same byte that represents that character in ASCII. 3. All characters encoded must have Unicode scalar values <= 0xFFFF, (ie characters that would be encoded by surrogates in UTF-16 are not allowed). Note that this restriction doesn't apply to -the built ap_context_t n support for UTF-8 and UTF-16. +the built ap_pool_t n support for UTF-8 and UTF-16. 4. No Unicode character may be encoded by more than one distinct sequence of bytes. */ diff --git a/test/test_find.c b/test/test_find.c index f4141e9e44..026f98ad18 100644 --- a/test/test_find.c +++ b/test/test_find.c @@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, int main (void) { - ap_context_t *p; + ap_pool_t *p; char line[512]; char tok[512]; diff --git a/test/test_parser.c b/test/test_parser.c index 29d53feef2..70aecbfb1c 100644 --- a/test/test_parser.c +++ b/test/test_parser.c @@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level, int main (void) { - ap_context_t *p; + ap_pool_t *p; const char *field; char *newstr; char instr[512]; |