is retreivable using a char string. Basically, you provide a string that
will be used as a key when you store the data. If the key was used before,
we will overwrite the old data. When you want to retreive your data, pass
in the same key, and we will find the data you care about. This also makes
it harder to put user data in when creating a context, so that option has
disappeared. It is also impossible to inherit user data from parent contexts.
This option may be added in later. I will be documenting this VERY soon.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83901
13f79535-47bb-0310-9956-
ffa450edef68
return NULL;
}
- ap_create_context(p, NULL, &sp);
+ ap_create_context(p, &sp);
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
if ((l[0] == '#') || (!l[0]))
char *name_scratch;
char *pad_scratch;
- ap_create_context(r->pool, NULL, &scratch);
+ ap_create_context(r->pool, &scratch);
if (name[0] == '\0') {
name = "/";
}
elts = (void **)sec->elts;
/* we have to allocate tmp space to do a stable sort */
- ap_create_context(p, NULL, &tmp);
+ ap_create_context(p, &tmp);
sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin));
for (i = 0; i < nelts; ++i) {
sortbin[i].orig_index = i;
const char *expect;
int access_status;
- ap_create_context(conn->pool, NULL, &p);
+ ap_create_context(conn->pool, &p);
r = ap_pcalloc(p, sizeof(request_rec));
r->pool = p;
r->connection = conn;
ap_context_t *rrp;
request_rec *rr;
- ap_create_context(r->pool, NULL, &rrp);
+ ap_create_context(r->pool, &rrp);
rr = ap_pcalloc(rrp, sizeof(request_rec));
rr->pool = rrp;
return rr;
ap_util_init();
ap_util_uri_init();
- ap_create_context(NULL, NULL, &pglobal);
+ ap_create_context(NULL, &pglobal);
g_pHookPool=pglobal;
- ap_create_context(pglobal, NULL, &pcommands);
+ ap_create_context(pglobal, &pcommands);
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 *));
}
}
- ap_create_context(pglobal, NULL, &pconf);
- ap_create_context(pglobal, NULL, &plog);
- ap_create_context(pconf, NULL, &ptemp);
+ ap_create_context(pglobal, &pconf);
+ ap_create_context(pglobal, &plog);
+ ap_create_context(pconf, &ptemp);
/* for legacy reasons, we read the configuration twice before
we actually serve any requests */
for (;;) {
ap_clear_pool(pconf);
- ap_create_context(pconf, NULL, &ptemp);
+ ap_create_context(pconf, &ptemp);
ap_server_root = def_server_root;
ap_run_pre_config(pconf, plog, ptemp);
server_conf = ap_read_config(pconf, ptemp, confname);
int native_socket;
pthread_mutex_lock(&thread_pool_create_mutex);
- ap_create_context(thread_pool_parent, NULL, &tpool);
+ ap_create_context(thread_pool_parent, &tpool);
pthread_mutex_unlock(&thread_pool_create_mutex);
- ap_create_context(tpool, NULL, &ptrans);
+ ap_create_context(tpool, &ptrans);
while (!workers_may_exit) {
workers_may_exit |= (max_requests_per_child != 0) && (requests_this_child <= 0);
my_pid = getpid();
child_num = child_num_arg;
- ap_create_context(pconf, NULL, &pchild);
+ ap_create_context(pconf, &pchild);
/*stuff to do before we switch id's, so we have permissions.*/
for (i = 0; i < max_threads; i++) {
worker_thread_free_ids[i] = i;
}
- ap_create_context(pchild, NULL, &thread_pool_parent);
+ ap_create_context(pchild, &thread_pool_parent);
pthread_mutex_init(&thread_pool_create_mutex, NULL);
pthread_mutex_init(&idle_thread_count_mutex, NULL);
pthread_mutex_init(&worker_thread_count_mutex, NULL);
free(ti);
- ap_create_context(tpool, NULL, &ptrans);
+ ap_create_context(tpool, &ptrans);
pthread_mutex_lock(&worker_thread_count_mutex);
worker_thread_count++;
ap_listen_rec *lr;
my_pid = getpid();
- ap_create_context(pconf, NULL, &pchild);
+ ap_create_context(pconf, &pchild);
/*stuff to do before we switch id's, so we have permissions.*/
reopen_scoreboard(pchild);
my_info->pid = my_child_num;
my_info->tid = i;
my_info->sd = 0;
- ap_create_context(pchild, NULL, &my_info->tpool);
+ ap_create_context(pchild, &my_info->tpool);
/* We are creating threads right now */
(void) ap_update_child_status(my_child_num, i, SERVER_STARTING,
/* Get a sub ap_context_t for global allocations in this child, so that
* we can have cleanups occur when the child exits.
*/
- ap_create_context(pconf, NULL, &pchild);
+ ap_create_context(pconf, &pchild);
- ap_create_context(pchild, NULL, &ptrans);
+ ap_create_context(pchild, &ptrans);
/* needs to be done before we switch UIDs so we have permissions */
reopen_scoreboard(pchild);