From: Christian Grothoff Date: Thu, 25 Mar 2010 12:31:13 +0000 (+0000) Subject: dbg X-Git-Tag: initial-import-from-subversion-38251~22377 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cfd6bff83c296df716fff12d32028a703e390988;p=oweals%2Fgnunet.git dbg --- diff --git a/src/core/core.h b/src/core/core.h index ea2925797..45d138140 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -29,7 +29,7 @@ /** * General core debugging. */ -#define DEBUG_CORE GNUNET_NO +#define DEBUG_CORE GNUNET_YES /** * Debugging interaction core-clients. diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 65b6d7397..53006a6d6 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -42,9 +42,9 @@ #include "core.h" -#define DEBUG_HANDSHAKE GNUNET_YES +#define DEBUG_HANDSHAKE GNUNET_NO -#define DEBUG_CORE_QUOTA GNUNET_NO +#define DEBUG_CORE_QUOTA GNUNET_YES /** * Receive and send buffer windows grow over time. For @@ -1747,9 +1747,9 @@ batch_message (struct Neighbour *n, GNUNET_YES, GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND); #if DEBUG_HANDSHAKE - fprintf (stderr, - "Encrypting message of type %u\n", - ntohs(((struct GNUNET_MessageHeader*)&pos[1])->type)); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Encrypting message of type %u\n", + ntohs(((struct GNUNET_MessageHeader*)&pos[1])->type)); #endif /* copy for encrypted transmission */ memcpy (&buf[ret], &pos[1], pos->size); @@ -3231,7 +3231,7 @@ handle_encrypted_message (struct Neighbour *n, /* validate hash */ GNUNET_CRYPTO_hash (&pt->sequence_number, size - ENCRYPTED_HEADER_SIZE - sizeof (GNUNET_HashCode), &ph); -#if DEBUG_CORE +#if DEBUG_HANDSHAKE GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "V-Hashed %u bytes of plaintext (`%s') using IV `%d'\n", size - ENCRYPTED_HEADER_SIZE - sizeof (GNUNET_HashCode), diff --git a/src/fs/fs_test_lib_data.conf b/src/fs/fs_test_lib_data.conf index fb1bdc533..5d2f60527 100644 --- a/src/fs/fs_test_lib_data.conf +++ b/src/fs/fs_test_lib_data.conf @@ -1,6 +1,6 @@ [PATHS] SERVICEHOME = /tmp/gnunet-test-fs-lib/ -DEFAULTCONFIG = test_fs_lib_data.conf +DEFAULTCONFIG = fs_test_lib_data.conf [gnunetd] HOSTKEY = $SERVICEHOME/.hostkey @@ -42,14 +42,14 @@ PORT = 43470 HOSTNAME = localhost #TOTAL_QUOTA_IN = 3932160 #TOTAL_QUOTA_OUT = 3932160 -#DEBUG = YES +DEBUG = YES #PREFIX = valgrind --tool=memcheck --leak-check=yes #BINARY = /home/grothoff/bin/gnunet-service-core [fs] PORT = 43471 HOSTNAME = localhost -#DEBUG = YES +DEBUG = YES #PREFIX = valgrind --tool=memcheck --leak-check=yes #BINARY = /home/grothoff/bin/gnunet-service-fs #PREFIX = xterm -e gdb -x cmd --args diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 59fd3022b..00683ba36 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -45,7 +45,7 @@ #include "gnunet-service-fs_indexing.h" #include "fs.h" -#define DEBUG_FS GNUNET_NO +#define DEBUG_FS 2 /** * Maximum number of outgoing messages we queue per peer.