X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_keyd.c;h=6836e9a2db02cbbe28d22b1a123a2103ee56da05;hb=1ec1e2efdf4092233ac2136dff5a35cf6c7f4710;hp=fec6ebbc6afd3dc8751eb97ea4ea158d113db726;hpb=ce50ec7c87838b4c5444d8846caa372c8e82fa0d;p=onak.git diff --git a/keydb_keyd.c b/keydb_keyd.c index fec6ebb..6836e9a 100644 --- a/keydb_keyd.c +++ b/keydb_keyd.c @@ -502,7 +502,7 @@ static void keyd_cleanupdb(struct onak_dbctx *dbctx) * this file are called in order to allow the DB to be initialized ready * for access. */ -struct onak_dbctx *keydb_keyd_init(bool readonly) +struct onak_dbctx *keydb_keyd_init(struct onak_db_config *dbcfg, bool readonly) { struct sockaddr_un sock; uint32_t cmd = KEYD_CMD_UNKNOWN; @@ -515,6 +515,7 @@ struct onak_dbctx *keydb_keyd_init(bool readonly) if (dbctx == NULL) { return NULL; } + dbctx->config = dbcfg; keyd_fd = socket(PF_UNIX, SOCK_STREAM, 0); if (keyd_fd < 0) { @@ -527,7 +528,7 @@ struct onak_dbctx *keydb_keyd_init(bool readonly) sock.sun_family = AF_UNIX; snprintf(sock.sun_path, sizeof(sock.sun_path) - 1, "%s/%s", - config.db_dir, + config.sock_dir, KEYD_SOCKET); if (connect(keyd_fd, (struct sockaddr *) &sock, sizeof(sock)) < 0) { logthing(LOGTHING_CRITICAL,