MCPcopy Create free account
hub / github.com/apache/httpd / initialize_module

Function initialize_module

modules/aaa/mod_auth_digest.c:401–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401static int initialize_module(apr_pool_t *p, apr_pool_t *plog,
402 apr_pool_t *ptemp, server_rec *s)
403{
404 /* initialize_module() will be called twice, and if it's a DSO
405 * then all static data from the first call will be lost. Only
406 * set up our static data on the second call. */
407 if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
408 return OK;
409
410#if APR_HAS_SHARED_MEMORY
411 /* Note: this stuff is currently fixed for the lifetime of the server,
412 * i.e. even across restarts. This means that A) any shmem-size
413 * configuration changes are ignored, and B) certain optimizations,
414 * such as only allocating the smallest necessary entry for each
415 * client, can't be done. However, the alternative is a nightmare:
416 * we can't call apr_shm_destroy on a graceful restart because there
417 * will be children using the tables, and we also don't know when the
418 * last child dies. Therefore we can never clean up the old stuff,
419 * creating a creeping memory leak.
420 */
421 if (initialize_tables(s, p) != OK) {
422 return !OK;
423 }
424#endif /* APR_HAS_SHARED_MEMORY */
425 return OK;
426}
427
428static void initialize_child(apr_pool_t *p, server_rec *s)
429{

Callers

nothing calls this directly

Calls 2

ap_state_queryFunction · 0.85
initialize_tablesFunction · 0.85

Tested by

no test coverage detected