]> the.earth.li Git - onak.git/blobdiff - keydb_file.c
Cleanup various includes
[onak.git] / keydb_file.c
index e0ed610e33cd7b976df43c01d9e5e8a216816fe9..0c9717a5900f9d13b202e30ed68f84b2a750d893 100644 (file)
@@ -22,6 +22,8 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -31,9 +33,9 @@
 #include "keydb.h"
 #include "keyid.h"
 #include "keystructs.h"
-#include "ll.h"
 #include "log.h"
 #include "mem.h"
+#include "onak.h"
 #include "onak-conf.h"
 #include "parsekey.h"
 
@@ -270,7 +272,7 @@ static void file_cleanupdb(struct onak_dbctx *dbctx)
  *
  *     This is just a no-op for flat file access.
  */
-struct onak_dbctx *keydb_file_init(bool readonly)
+struct onak_dbctx *keydb_file_init(struct onak_db_config *dbcfg, bool readonly)
 {
        struct onak_dbctx *dbctx;
 
@@ -279,7 +281,8 @@ struct onak_dbctx *keydb_file_init(bool readonly)
                return NULL;
        }
 
-       dbctx->priv = strdup(config.db_dir);
+       dbctx->config = dbcfg;
+       dbctx->priv = strdup(dbcfg->location);
 
        dbctx->cleanupdb                = file_cleanupdb;
        dbctx->starttrans               = file_starttrans;