fixing issue pointed out by amatus
[oweals/gnunet.git] / src / datacache / perf_datacache.c
index e2eb474d4f56a55898b5591437eacbef1aad897c..0231992314ff3598733ab5086ca681dbc1a64586 100644 (file)
@@ -46,7 +46,7 @@ static int
 checkIt (void *cls,
         struct GNUNET_TIME_Absolute exp,
         const GNUNET_HashCode * key,
-         uint32_t size, 
+         size_t size, 
         const char *data, 
         enum GNUNET_BLOCK_Type type)
 {
@@ -76,7 +76,12 @@ run (void *cls,
                               cfg,
                               "perfcache");
 
-  ASSERT (NULL != h);
+  if (h == NULL)
+    {
+      fprintf (stderr,
+              "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
+      return;
+    }
   exp = GNUNET_TIME_absolute_get ();
   start = exp;
   exp.value += 5 * 60 * 1000;