]> the.earth.li Git - onak.git/blobdiff - lookup.c
cscvs to tla changeset 77
[onak.git] / lookup.c
index e4ac9cefaecbe36fdbfbb7ba815d3de916e63940..33fc9abb6df27bfec7a7deb5a3d9dfca67a0ee01 100644 (file)
--- a/lookup.c
+++ b/lookup.c
@@ -4,6 +4,8 @@
  * Jonathan McDowell <noodles@earth.li>
  *
  * Copyright 2002 Project Purple
+ *
+ * $Id: lookup.c,v 1.8 2003/06/04 20:57:10 noodles Exp $
  */
 
 //#include <stdint.h>
@@ -17,6 +19,7 @@
 #include "getcgi.h"
 #include "keydb.h"
 #include "keyindex.h"
+#include "log.h"
 #include "mem.h"
 #include "onak-conf.h"
 #include "parsekey.h"
@@ -119,6 +122,8 @@ int main(int argc, char *argv[])
        } else if (search == NULL) {
                puts("Error: No key to search for supplied.");
        } else {
+               readconfig();
+               initlogthing("lookup", config.logfile);
                initdb();
                switch (op) {
                case OP_GET:
@@ -147,6 +152,8 @@ int main(int argc, char *argv[])
                        puts("Unknown operation!");
                }
                cleanupdb();
+               cleanuplogthing();
+               cleanupconfig();
        }
        puts("<hr>");
        puts("Produced by onak " VERSION " by Jonathan McDowell");