-debug code for new transport issue
authorChristian Grothoff <christian@grothoff.org>
Tue, 24 Jul 2012 12:52:08 +0000 (12:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 24 Jul 2012 12:52:08 +0000 (12:52 +0000)
src/transport/gnunet-service-transport_validation.c
src/transport/plugin_transport_tcp.c

index 49bfdd31719f1d828c9da84b4d3b7eb07ef561d0..11971d8a18955d57795f8423201018f733ac012b 100644 (file)
@@ -34,7 +34,7 @@
 #include "gnunet_peerinfo_service.h"
 #include "gnunet_signatures.h"
 
-#define KEEP_093_COMPATIBILITY GNUNET_YES
+#define KEEP_093_COMPATIBILITY GNUNET_NO
 
 /**
  * How long is a PONG signature valid?  We'll recycle a signature until
@@ -885,6 +885,11 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
     sig_cache_exp = &no_address_signature_expiration;
   }
 
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+              "I am `%s', sending PONG to peer `%s'\n",
+             GNUNET_h2s (&GST_my_identity.hashPubKey),
+              GNUNET_i2s (sender));
+
   pong = GNUNET_malloc (sizeof (struct TransportPongMessage) + alen + slen);
   pong->header.size =
       htons (sizeof (struct TransportPongMessage) + alen + slen);
@@ -1134,6 +1139,10 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
                                 &ve->public_key))
   {
     GNUNET_break_op (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+               "Invalid signature on address %s:%s from peer `%s'\n",
+               tname, GST_plugins_a2s (ve->address),
+               GNUNET_i2s (sender));
     return;
   }
 
index e5b82197807326a3b2d1a321c0ed993610960aa9..2402d04c418802dad4adc43fa537fe7825a80408 100644 (file)
@@ -487,8 +487,9 @@ plugin_tcp_access_check (void *cls,
 {
   struct Plugin *plugin = cls;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Accepting new incoming TCP connection\n");
+  LOG (GNUNET_ERROR_TYPE_ERROR,
+       "Accepting new incoming TCP connection from `%s'\n",
+       GNUNET_a2s (addr, addrlen));
   if (0 == plugin->max_connections)
     return GNUNET_NO;
   plugin->max_connections--;