gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21519 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r21519 - gnunet/src/fs
Date: Wed, 16 May 2012 13:22:58 +0200

Author: grothoff
Date: 2012-05-16 13:22:58 +0200 (Wed, 16 May 2012)
New Revision: 21519

Modified:
   gnunet/src/fs/test_fs_search_probes.c
   gnunet/src/fs/test_fs_test_lib.c
Log:
-code cleanup

Modified: gnunet/src/fs/test_fs_search_probes.c
===================================================================
--- gnunet/src/fs/test_fs_search_probes.c       2012-05-16 09:15:06 UTC (rev 
21518)
+++ gnunet/src/fs/test_fs_search_probes.c       2012-05-16 11:22:58 UTC (rev 
21519)
@@ -23,14 +23,11 @@
  * @brief simple testcase for publish + search operation with probes
  * @author Christian Grothoff
  */
-
 #include "platform.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_YES
-
 #define START_ARM GNUNET_YES
 
 /**
@@ -96,14 +93,13 @@
   switch (event->status)
   {
   case GNUNET_FS_STATUS_PUBLISH_PROGRESS:
-#if VERBOSE
-    printf ("Publish is progressing (%llu/%llu at level %u off %llu)...\n",
-            (unsigned long long) event->value.publish.completed,
-            (unsigned long long) event->value.publish.size,
-            event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.
-            progress.offset);
-#endif
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Publish is progressing (%llu/%llu at level %u off %llu)...\n",
+               (unsigned long long) event->value.publish.completed,
+               (unsigned long long) event->value.publish.size,
+               event->value.publish.specifics.progress.depth,
+               (unsigned long long) event->value.publish.specifics.
+               progress.offset);
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     kuri = GNUNET_FS_uri_ksk_create_from_args (1, keywords);
@@ -115,9 +111,7 @@
     GNUNET_assert (search != NULL);
     break;
   case GNUNET_FS_STATUS_SEARCH_RESULT:
-#if VERBOSE
-    printf ("Search complete.\n");
-#endif
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Search complete.\n");
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
     FPRINTF (stderr, "Error publishing file: %s\n",
@@ -179,9 +173,6 @@
   p->arm_proc =
       GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
                                "gnunet-service-arm",
-#if VERBOSE
-                               "-L", "DEBUG",
-#endif
                                "-c", cfgname, NULL);
 #endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
@@ -258,9 +249,6 @@
     "test-fs-search-probes",
     "-c",
     "test_fs_search_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -268,11 +256,7 @@
   };
 
   GNUNET_log_setup ("test_fs_search_probes",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx,
                       "test-fs-search", "nohelp", options, &run, NULL);

Modified: gnunet/src/fs/test_fs_test_lib.c
===================================================================
--- gnunet/src/fs/test_fs_test_lib.c    2012-05-16 09:15:06 UTC (rev 21518)
+++ gnunet/src/fs/test_fs_test_lib.c    2012-05-16 11:22:58 UTC (rev 21519)
@@ -138,9 +138,6 @@
     "test-fs-test-lib",
     "-c",
     "fs_test_lib_data.conf",
-#if VERBOSE
-    "-L", "DEBUG",
-#endif
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -149,11 +146,7 @@
 
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-lib/");
   GNUNET_log_setup ("test_fs_test_lib",
-#if VERBOSE
-                    "DEBUG",
-#else
                     "WARNING",
-#endif
                     NULL);
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx,
                       "test-fs-test-lib", "nohelp", options, &run, NULL);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]