diff options
author | Graham Leggett <minfrin@apache.org> | 2021-06-22 11:04:17 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2021-06-22 11:04:17 +0000 |
commit | 4be1214551403ac807c79c753c47df154bdb755f (patch) | |
tree | 92713553b6fc146637174648e1c396e7b24e0bbe /dbm | |
parent | ed965cbccdc8ef54e258941d43e21025c1abf3e4 (diff) | |
download | apr-4be1214551403ac807c79c753c47df154bdb755f.tar.gz |
Fall back on default if the dbm type is unset.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890966 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dbm')
-rw-r--r-- | dbm/apr_dbm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dbm/apr_dbm.c b/dbm/apr_dbm.c index 0147e0ab1..5d938e6c6 100644 --- a/dbm/apr_dbm.c +++ b/dbm/apr_dbm.c @@ -86,6 +86,10 @@ APR_DECLARE(apr_status_t) apr_dbm_get_driver(const apr_dbm_driver_t **vtable, *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_driver(const apr_dbm_driver_t **vtable, *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")) { |