]> the.earth.li Git - onak.git/blobdiff - sixdegrees.c
Cleanup db4 properly if we fail to open it.
[onak.git] / sixdegrees.c
index 9b13cfbca08cafa38ac094aeec1ee9897fcb4694..d7d650f3c1260f3265a941852560f29e4225cadf 100644 (file)
@@ -4,8 +4,6 @@
  * Jonathan McDowell <noodles@earth.li>
  *
  * Copyright 2001-2002 Project Purple.
- *
- * $Id: sixdegrees.c,v 1.4 2003/06/04 20:57:12 noodles Exp $
  */
 
 #include <stdio.h>
@@ -15,6 +13,7 @@
 #include "keydb.h"
 #include "keystructs.h"
 #include "ll.h"
+#include "log.h"
 #include "onak-conf.h"
 #include "stats.h"
 
@@ -126,12 +125,14 @@ int main(int argc, char *argv[])
                keyid = strtoll(argv[1], NULL, 16);
        }
 
-       readconfig();
-       initdb();
+       readconfig(NULL);
+       initlogthing("sixdegrees", config.logfile);
+       initdb(true);
        inithash();
        sixdegrees(getfullkeyid(keyid));
        destroyhash();
        cleanupdb();
+       cleanuplogthing();
        cleanupconfig();
 
        return 0;