[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11926 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11926 - gnunet/src/transport |
Date: |
Thu, 24 Jun 2010 15:18:38 +0200 |
Author: nevans
Date: 2010-06-24 15:18:38 +0200 (Thu, 24 Jun 2010)
New Revision: 11926
Modified:
gnunet/src/transport/gnunet-service-transport.c
Log:
better debug message
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2010-06-24 13:15:34 UTC
(rev 11925)
+++ gnunet/src/transport/gnunet-service-transport.c 2010-06-24 13:18:38 UTC
(rev 11926)
@@ -45,6 +45,8 @@
#define SIGN_USELESS GNUNET_NO
+#define DEBUG_TRANSPORT_HELLO GNUNET_YES
+
/**
* Should we do some additional checks (to validate behavior
* of clients)?
@@ -3820,7 +3822,9 @@
const struct GNUNET_HELLO_Message *hello;
struct CheckHelloValidatedContext *chvc;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey;
-
+#if DEBUG_TRANSPORT_HELLO
+ char *my_id;
+#endif
hsize = ntohs (message->size);
if ((ntohs (message->type) != GNUNET_MESSAGE_TYPE_HELLO) ||
(hsize < sizeof (struct GNUNET_MessageHeader)))
@@ -3881,12 +3885,19 @@
GNUNET_HELLO_size(hello)));
chvc = chvc->next;
}
-#if DEBUG_TRANSPORT
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Starting validation of `%s' message for `%4s' of size %u\n",
- "HELLO",
- GNUNET_i2s (&target),
- GNUNET_HELLO_size(hello));
+#if DEBUG_TRANSPORT_HELLO
+ if (plugin != NULL)
+ {
+ my_id = GNUNET_strdup(GNUNET_i2s(plugin->env.my_identity));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%s: Starting validation of `%s' message for `%4s' via '%s'
of size %u\n",
+ my_id,
+ "HELLO",
+ GNUNET_i2s (&target),
+ (plugin == NULL) ? "???" : plugin->short_name,
+ GNUNET_HELLO_size(hello));
+ GNUNET_free(my_id);
+ }
#endif
chvc = GNUNET_malloc (sizeof (struct CheckHelloValidatedContext) + hsize);
chvc->ve_count = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11926 - gnunet/src/transport,
gnunet <=