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

Function create_dbd_config

modules/database/mod_dbd.c:94–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92#define DEFAULT_SQL_INIT_ARRAY_SIZE 5
93
94static void *create_dbd_config(apr_pool_t *pool, server_rec *s)
95{
96 svr_cfg *svr = apr_pcalloc(pool, sizeof(svr_cfg));
97 dbd_cfg_t *cfg = svr->cfg = apr_pcalloc(pool, sizeof(dbd_cfg_t));
98
99 cfg->server = s;
100 cfg->name = no_dbdriver; /* to generate meaningful error messages */
101 cfg->params = ""; /* don't risk segfault on misconfiguration */
102 cfg->persist = -1;
103#if APR_HAS_THREADS
104 cfg->nmin = DEFAULT_NMIN;
105 cfg->nkeep = DEFAULT_NKEEP;
106 cfg->nmax = DEFAULT_NMAX;
107 cfg->exptime = DEFAULT_EXPTIME;
108#endif
109 cfg->queries = apr_hash_make(pool);
110 cfg->init_queries = apr_array_make(pool, DEFAULT_SQL_INIT_ARRAY_SIZE,
111 sizeof(const char *));
112
113 return svr;
114}
115
116static void *merge_dbd_config(apr_pool_t *pool, void *basev, void *addv)
117{

Callers 2

ap_dbd_sql_initFunction · 0.85
ap_dbd_prepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected