aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-16 11:22:58 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-16 11:22:58 +0000
commita1d7d541d65b18b86c0e316b0a34de4168bf8b8c (patch)
treecd4ca36b68a952e754ade7c475cb00e5cd9981d2 /src
parentc0c97de5adc9bc6922d001b53b4492038d23baa3 (diff)
-code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/fs/test_fs_search_probes.c32
-rw-r--r--src/fs/test_fs_test_lib.c7
2 files changed, 8 insertions, 31 deletions
diff --git a/src/fs/test_fs_search_probes.c b/src/fs/test_fs_search_probes.c
index 6f57ea8b0e..b816598996 100644
--- a/src/fs/test_fs_search_probes.c
+++ b/src/fs/test_fs_search_probes.c
@@ -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 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
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 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
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 @@ setup_peer (struct PeerContext *p, const char *cfgname)
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 @@ main (int argc, char *argv[])
"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 @@ main (int argc, char *argv[])
};
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);
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c
index 589abb3fbb..29d5fe47f2 100644
--- a/src/fs/test_fs_test_lib.c
+++ b/src/fs/test_fs_test_lib.c
@@ -138,9 +138,6 @@ main (int argc, char *argv[])
"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 @@ main (int argc, char *argv[])
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);