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

Function x_create_server_config

modules/examples/mod_example_hooks.c:636–657  ·  view source on GitHub ↗

* This function gets called to create a per-server configuration * record. It will always be called for the "default" server. * * The return value is a pointer to the created module-specific * structure. */

Source from the content-addressed store, hash-verified

634 * structure.
635 */
636static void *x_create_server_config(apr_pool_t *p, server_rec *s)
637{
638
639 x_cfg *cfg;
640 char *sname = s->server_hostname;
641
642 /*
643 * As with the x_create_dir_config() reoutine, we allocate and fill
644 * in an empty record.
645 */
646 cfg = (x_cfg *) apr_pcalloc(p, sizeof(x_cfg));
647 cfg->local = 0;
648 cfg->congenital = 0;
649 cfg->cmode = CONFIG_MODE_SERVER;
650 /*
651 * Note that we were called in the trace list.
652 */
653 sname = (sname != NULL) ? sname : "";
654 cfg->loc = apr_pstrcat(p, "SVR(", sname, ")", NULL);
655 trace_startup(p, s, cfg, "x_create_server_config()");
656 return (void *) cfg;
657}
658
659/*
660 * This function gets called to merge two per-server configuration

Callers

nothing calls this directly

Calls 1

trace_startupFunction · 0.85

Tested by

no test coverage detected