| 92 | #define DEFAULT_SQL_INIT_ARRAY_SIZE 5 |
| 93 | |
| 94 | static 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 | |
| 116 | static void *merge_dbd_config(apr_pool_t *pool, void *basev, void *addv) |
| 117 | { |
no outgoing calls
no test coverage detected