-we use 4 chars, not 8 for pIDs
authorChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 19:01:51 +0000 (19:01 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 18 Oct 2015 19:01:51 +0000 (19:01 +0000)
src/core/gnunet-service-core_kx.c

index 5e3864dcc568f40522b6ecb3fc873b14d0df69cc..931125a97beab7315da0a703e25e0ecb46d4f5f2 100644 (file)
@@ -1058,11 +1058,17 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx,
               &GSC_my_identity,
               sizeof (struct GNUNET_PeerIdentity)))
   {
-    char sender[9];
-    char peer[9];
-
-    GNUNET_snprintf (sender, sizeof (sender), "%8s", GNUNET_i2s (&kx->peer));
-    GNUNET_snprintf (peer, sizeof (peer), "%8s", GNUNET_i2s (&t.target));
+    char sender[5];
+    char peer[5];
+
+    GNUNET_snprintf (sender,
+                     sizeof (sender),
+                     "%4s",
+                     GNUNET_i2s (&kx->peer));
+    GNUNET_snprintf (peer,
+                     sizeof (peer),
+                     "%4s",
+                     GNUNET_i2s (&t.target));
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _("Received PING from `%s' for different identity: I am `%s', PONG identity: `%s'\n"),
                 sender,