]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - lookup.c
Update version to mark arch build.
[onak.git] / lookup.c
index d5392d599d318f806b059dd1e6fc043e0bfbed53..e5cd1ae8e79f452cbd91169ba46db992cede62fd 100644 (file)
--- a/lookup.c
+++ b/lookup.c
@@ -16,6 +16,8 @@
 #include "armor.h"
 #include "charfuncs.h"
 #include "cleankey.h"
 #include "armor.h"
 #include "charfuncs.h"
 #include "cleankey.h"
+#include "cleanup.h"
+#include "config.h"
 #include "getcgi.h"
 #include "keydb.h"
 #include "keyindex.h"
 #include "getcgi.h"
 #include "keydb.h"
 #include "keyindex.h"
@@ -102,7 +104,7 @@ int main(int argc, char *argv[])
                        search = params[i+1];
                        params[i+1] = NULL;
                        if (search != NULL) {
                        search = params[i+1];
                        params[i+1] = NULL;
                        if (search != NULL) {
-                               keyid = strtoul(search, &end, 16);
+                               keyid = strtoull(search, &end, 16);
                                if (*search != 0 &&
                                                end != NULL &&
                                                *end == 0) {
                                if (*search != 0 &&
                                                end != NULL &&
                                                *end == 0) {
@@ -156,6 +158,7 @@ int main(int argc, char *argv[])
        } else {
                readconfig(NULL);
                initlogthing("lookup", config.logfile);
        } else {
                readconfig(NULL);
                initlogthing("lookup", config.logfile);
+               catchsignals();
                initdb(true);
                switch (op) {
                case OP_GET:
                initdb(true);
                switch (op) {
                case OP_GET:
@@ -209,7 +212,8 @@ int main(int argc, char *argv[])
        }
        if (!mrhkp) {
                puts("<hr>");
        }
        if (!mrhkp) {
                puts("<hr>");
-               puts("Produced by onak " VERSION " by Jonathan McDowell");
+               puts("Produced by onak " PACKAGE_VERSION 
+                               " by Jonathan McDowell");
                end_html();
        }
 
                end_html();
        }