(hdb_create): check for dynamic backend after static to avoid warning
from dynamic backend when using a known static backend git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12445 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -317,17 +317,17 @@ find_method (const char *filename, const char **rest)
|
|||||||
krb5_error_code
|
krb5_error_code
|
||||||
hdb_create(krb5_context context, HDB **db, const char *filename)
|
hdb_create(krb5_context context, HDB **db, const char *filename)
|
||||||
{
|
{
|
||||||
const struct hdb_method *h = NULL;
|
const struct hdb_method *h;
|
||||||
const char *residual;
|
const char *residual;
|
||||||
|
|
||||||
if(filename == NULL)
|
if(filename == NULL)
|
||||||
filename = HDB_DEFAULT_DB;
|
filename = HDB_DEFAULT_DB;
|
||||||
krb5_add_et_list(context, initialize_hdb_error_table_r);
|
krb5_add_et_list(context, initialize_hdb_error_table_r);
|
||||||
|
h = find_method (filename, &residual);
|
||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
|
if (h == NULL)
|
||||||
h = find_dynamic_method (context, filename, &residual);
|
h = find_dynamic_method (context, filename, &residual);
|
||||||
#endif
|
#endif
|
||||||
if (h == NULL)
|
|
||||||
h = find_method (filename, &residual);
|
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
krb5_errx(context, 1, "No database support! (hdb_create)");
|
krb5_errx(context, 1, "No database support! (hdb_create)");
|
||||||
return (*h->create)(context, db, residual);
|
return (*h->create)(context, db, residual);
|
||||||
|
Reference in New Issue
Block a user