- opaque mq structs
[oweals/gnunet.git] / src / fs / test_fs_directory.c
index ac581bd6f5fed1253f1b6a6cefa729edf0e6da68..95225d7c0ad59bbce0681f514eb91c711b0ba01a 100644 (file)
@@ -28,7 +28,7 @@
 #include <extractor.h>
 #include "gnunet_util_lib.h"
 #include "gnunet_fs_service.h"
-#include "fs.h"
+#include "fs_api.h"
 
 #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); return 1; }
 
@@ -59,7 +59,7 @@ processor (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
       return;
     }
   }
-  fprintf (stderr, "Error at %s:%d\n", __FILE__, __LINE__);
+  FPRINTF (stderr, "Error at %s:%d\n", __FILE__, __LINE__);
 }
 
 static int
@@ -79,7 +79,7 @@ testDirectory (unsigned int i)
   char txt[128];
   int ret = 0;
   struct GNUNET_TIME_Absolute start;
-  char *s;
+  const char *s;
 
   cls.max = i;
   uris = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri *) * i);
@@ -130,11 +130,11 @@ testDirectory (unsigned int i)
     GNUNET_FS_directory_builder_add (db, uris[p], mds[p], NULL);
   GNUNET_FS_directory_builder_finish (db, &dlen, (void **) &data);
   s = GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_duration
-                                              (start));
-  fprintf (stdout,
+                                              (start),
+                                             GNUNET_YES);
+  FPRINTF (stdout,
            "Creating directory with %u entires and total size %llu took %s\n",
            i, (unsigned long long) dlen, s);
-  GNUNET_free (s);
   if (i < 100)
   {
     cls.pos = 0;