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

Function dbd_check

modules/database/mod_dbd.c:769–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769static apr_status_t dbd_check(apr_pool_t *pool, server_rec *s, ap_dbd_t *rec)
770{
771 svr_cfg *svr;
772 apr_status_t rv = apr_dbd_check_conn(rec->driver, pool, rec->handle);
773 const char *errmsg;
774
775 if ((rv == APR_SUCCESS) || (rv == APR_ENOTIMPL)) {
776 return APR_SUCCESS;
777 }
778
779 /* we don't have a driver-specific error code, so we'll just pass
780 * a "success" value and rely on the driver to ignore it
781 */
782 errmsg = apr_dbd_error(rec->driver, rec->handle, 0);
783 if (!errmsg) {
784 errmsg = "(unknown)";
785 }
786
787 svr = ap_get_module_config(s->module_config, &dbd_module);
788 ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00639)
789 "DBD [%s] Error: %s", svr->cfg->name, errmsg);
790 return rv;
791}
792
793DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s)
794{

Callers 1

ap_dbd_openFunction · 0.85

Calls 2

ap_get_module_configFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected