Commit 27bf4a7c authored by Nick Kew's avatar Nick Kew
Browse files

Add defaults and comments for better robustness against misuse

(based on comments from Chris Darroch).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345128 13f79535-47bb-0310-9956-ffa450edef68
parent 1f8b6a9d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ static void *dbd_cfg(apr_pool_t *p, server_rec *x)
{
    svr_cfg *svr = (svr_cfg*) apr_pcalloc(p, sizeof(svr_cfg));
    svr->persist = -1;
    svr->name = svr->params = ""; /* don't risk segfault on misconfiguration */
#if APR_HAS_THREADS
    svr->nmin = DEFAULT_NMIN;
    svr->nkeep = DEFAULT_NKEEP;
+4 −1
Original line number Diff line number Diff line
@@ -64,7 +64,10 @@ AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
 */
AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);

/* Prepare a statement for use by a client module */
/* Prepare a statement for use by a client module during
 * the server startup/configuration phase.  Can't be called
 * after the server has created its children (use apr_dbd_*).
 */
AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);

/* Also export them as optional functions for modules that prefer it */