You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mi...@apache.org on 2021/06/22 11:04:17 UTC
svn commit: r1890966 - /apr/apr/trunk/dbm/apr_dbm.c
Author: minfrin
Date: Tue Jun 22 11:04:17 2021
New Revision: 1890966
URL: http://svn.apache.org/viewvc?rev=1890966&view=rev
Log:
Fall back on default if the dbm type is unset.
Modified:
apr/apr/trunk/dbm/apr_dbm.c
Modified: apr/apr/trunk/dbm/apr_dbm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbm/apr_dbm.c?rev=1890966&r1=1890965&r2=1890966&view=diff
==============================================================================
--- apr/apr/trunk/dbm/apr_dbm.c (original)
+++ apr/apr/trunk/dbm/apr_dbm.c Tue Jun 22 11:04:17 2021
@@ -86,6 +86,10 @@ APR_DECLARE(apr_status_t) apr_dbm_get_dr
*result = NULL; /* until further notice */
}
+ if (!type) {
+ type = DBM_NAME;
+ }
+
*vtable = NULL;
if (!strcasecmp(type, "default")) *vtable = &DBM_VTABLE;
#if APU_HAVE_DB
@@ -133,6 +137,10 @@ APR_DECLARE(apr_status_t) apr_dbm_get_dr
*result = NULL; /* until further notice */
}
+ if (!type) {
+ type = DBM_NAME;
+ }
+
if (!strcasecmp(type, "default")) type = DBM_NAME;
else if (!strcasecmp(type, "db")) type = "db";
else if (*type && !strcasecmp(type + 1, "dbm")) {