]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/patches/testing/tcdbtest.c
ebl get a patch for faketape + bacula 2.2
[bacula/bacula] / bacula / patches / testing / tcdbtest.c
index c60f75bff2a370e5f56d0f53236052db4edbf30b..9e035ab460036d5f517e1881512d9b5ed9b2c808 100644 (file)
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
    /*
     * apow : 128 (size of stat hash field)
     */
-   int opt=HDBTLARGE;//HDBTTCBS;
+   int opt=HDBTLARGE | HDBTTCBS;
    tchdbtune(hdb, atoll(argv[1]), 7, 16, opt);
    fprintf(res, "bucket;%lli\n", atoll(argv[1]));
    fprintf(res, "compress;%i\n", opt);
@@ -158,11 +158,7 @@ int main(int argc, char **argv)
   while((key = tchdbiternext2(hdb)) != NULL){
         value = tchdbget3(hdb, key, strlen(key)+1, &elt, sizeof(elt));
         if (value > 0) {
-           elt.seen=1;
-           if (!tchdbputasync(hdb, key, strlen(key)+1, &elt, sizeof(elt))) {
-              ecode = tchdbecode(hdb);
-              fprintf(stderr, "put error: %s\n", tchdberrmsg(ecode));
-           }
+           elt.seen=1; // check seen element
         } else {
            fprintf(stderr, "can't find %s in hash\n", line);
         }