| 904 | } |
| 905 | |
| 906 | DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_cacquire(conn_rec *c) |
| 907 | { |
| 908 | dbd_acquire_t *acq = ap_get_module_config(c->conn_config, &dbd_module); |
| 909 | |
| 910 | if (!acq) { |
| 911 | acq = apr_palloc(c->pool, sizeof(dbd_acquire_t)); |
| 912 | acq->rec = ap_dbd_open(c->pool, c->base_server); |
| 913 | if (acq->rec) { |
| 914 | svr_cfg *svr = ap_get_module_config(c->base_server->module_config, |
| 915 | &dbd_module); |
| 916 | |
| 917 | ap_set_module_config(c->conn_config, &dbd_module, acq); |
| 918 | if (svr->cfg->persist) { |
| 919 | acq->reslist = svr->group->reslist; |
| 920 | apr_pool_cleanup_register(c->pool, acq, dbd_release, |
| 921 | apr_pool_cleanup_null); |
| 922 | } |
| 923 | } |
| 924 | } |
| 925 | |
| 926 | return acq->rec; |
| 927 | } |
| 928 | #else |
| 929 | DBD_DECLARE_NONSTD(ap_dbd_t *) ap_dbd_acquire(request_rec *r) |
| 930 | { |
nothing calls this directly
no test coverage detected