print emsg
authorChristian Grothoff <christian@grothoff.org>
Mon, 19 Sep 2011 20:05:27 +0000 (20:05 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 19 Sep 2011 20:05:27 +0000 (20:05 +0000)
src/dht/test_dht_twopeer.c

index fc15609965487cde05633a360fb32c5ab3ea3f39..eddd230b7894ef960f3927b3667c671fd90353f5 100644 (file)
@@ -166,7 +166,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
  * @param size number of bytes in data
  * @param data pointer to the result data
  */
-void
+static void
 get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
                      const GNUNET_HashCode * key,
                      const struct GNUNET_PeerIdentity *const *get_path,
@@ -180,6 +180,12 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Key returned is not the same key as was searched for!\n");
+    fprintf (stderr,
+            "Looked for key `%s'\n",
+            GNUNET_h2s (&get_context->peer->hashPubKey));
+    fprintf (stderr,
+            "Got key `%s'\n",
+            GNUNET_h2s (key));
     GNUNET_SCHEDULER_cancel (die_task);
     die_task =
         GNUNET_SCHEDULER_add_now (&end_badly,