bug hunting
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 11 May 2011 08:09:36 +0000 (08:09 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 11 May 2011 08:09:36 +0000 (08:09 +0000)
src/core/gnunet-service-core.c
src/transport/gnunet-service-transport.c

index f54e4a7a0434537530cbec2904c460ccb6c52ec6..0bf6a5c39b20f67cbc60b791a5f06e79bbb23476 100644 (file)
@@ -3534,6 +3534,11 @@ handle_ping (struct Neighbour *n,
   if (0 != memcmp (&t.target,
                    &my_identity, sizeof (struct GNUNET_PeerIdentity)))
     {
+      char * peer;
+         GNUNET_asprintf(&peer, "%s",GNUNET_i2s (&t.target));
+         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 "Received PING for different identity : I am %s, PONG identity: %s\n",GNUNET_i2s (&my_identity), peer );
+         GNUNET_free (peer);
       GNUNET_break_op (0);
       return;
     }
index ed7942112fd614efa50608900935e3ba06fc86da..fb59a90dc86b8a1dc73c4e71575701114fde937c 100644 (file)
@@ -4047,10 +4047,11 @@ check_pending_validation (void *cls,
                         &my_identity,
                         sizeof (struct GNUNET_PeerIdentity)))
        {
-         char * peer1;
-         GNUNET_asprintf(&peer1, "%s",GNUNET_i2s (&pong->pid));
+      char * peer;
+         GNUNET_asprintf(&peer, "%s",GNUNET_i2s (&pong->pid));
          GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                 "Received PONG for different identity : %s %s\n",GNUNET_i2s (&my_identity), peer1 );
+                 "Received PONG for different identity : I am %s, PONG identity: %s\n",GNUNET_i2s (&my_identity), peer );
+         GNUNET_free (peer);
          GNUNET_break_op (0);
          return GNUNET_NO;
        }