X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_hkp.c;h=6707ae6974f0cb34f4c1007615b29b0ada503082;hb=2458360e75aa46091f60c16e041c07bffe2edefb;hp=0c6fd5a97f97f7eb50eecbe5a8d564430d3150e3;hpb=4117d3174e8ae389db9fff2867592fc798a896b2;p=onak.git diff --git a/keydb_hkp.c b/keydb_hkp.c index 0c6fd5a..6707ae6 100644 --- a/keydb_hkp.c +++ b/keydb_hkp.c @@ -34,6 +34,7 @@ #include "version.h" struct onak_hkp_dbctx { + struct onak_db_config *config; /* Our DB config info */ CURL *curl; char hkpbase[1024]; }; @@ -346,7 +347,7 @@ static void hkp_cleanupdb(struct onak_dbctx *dbctx) * * We initialize CURL here. */ -struct onak_dbctx *keydb_hkp_init(bool readonly) +struct onak_dbctx *keydb_hkp_init(struct onak_db_config *dbcfg, bool readonly) { struct onak_dbctx *dbctx; struct onak_hkp_dbctx *privctx; @@ -357,6 +358,7 @@ struct onak_dbctx *keydb_hkp_init(bool readonly) return NULL; } + dbctx->config = dbcfg; dbctx->priv = privctx = malloc(sizeof(*privctx)); dbctx->cleanupdb = hkp_cleanupdb; dbctx->starttrans = hkp_starttrans; @@ -373,7 +375,7 @@ struct onak_dbctx *keydb_hkp_init(bool readonly) dbctx->getfullkeyid = generic_getfullkeyid; dbctx->iterate_keys = hkp_iterate_keys; - if (!hkp_parse_url(privctx, config.db_dir)) { + if (!hkp_parse_url(privctx, dbcfg->location)) { exit(EXIT_FAILURE); } curl_global_init(CURL_GLOBAL_DEFAULT);