]> the.earth.li Git - onak.git/blobdiff - maxpath.c
cscvs to tla changeset 39
[onak.git] / maxpath.c
index 37142811797279165c67bdf9efe3a68991716609..509616e3ab340e727c0d6c554a0c6be8fd91c989 100644 (file)
--- a/maxpath.c
+++ b/maxpath.c
@@ -13,6 +13,7 @@
 #include "hash.h"
 #include "keydb.h"
 #include "ll.h"
+#include "onak-conf.h"
 #include "stats.h"
 
 void findmaxpath(unsigned long max)
@@ -21,10 +22,9 @@ void findmaxpath(unsigned long max)
        struct ll *curkey;
        unsigned long distance, loop;
 
-       printf("In findmaxpath\n");
        distance = 0;
        from = to = tmp = NULL;
-       hash_getkeysigs(0x5B430367);
+       hash_getkeysigs(0xF1BD4BE45B430367);
 
        for (loop = 0; (loop < HASHSIZE) && (distance < max); loop++) {
                curkey = gethashtableentry(loop);
@@ -51,16 +51,20 @@ void findmaxpath(unsigned long max)
                        from->keyid,
                        to->keyid,
                        distance);
+       dofindpath(to->keyid, from->keyid, false);
 }
 
 int main(int argc, char *argv[])
 {
+       readconfig();
        initdb();
        inithash();
        findmaxpath(30);
        printf("--------\n");
        findmaxpath(30);
+       destroyhash();
        cleanupdb();
+       cleanupconfig();
        
        return EXIT_SUCCESS;
 }