+
+ char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Peer %u (`%4s') sending message with type %u and size %u bytes to peer %u (`%4s')\n",
+ p2->no, ps, ntohs (hdr->type), ntohs (hdr->size), p->no,
+ GNUNET_i2s (&p->id));
+ GNUNET_free (ps);
+
+ return TEST_MESSAGE_SIZE;
+}
+
+
+static void
+sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ send_task = GNUNET_SCHEDULER_NO_TASK;
+
+ if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
+ return;
+ char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
+ p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
+ GNUNET_free (receiver_s);
+ s_sending = GNUNET_YES;
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0,
+ TIMEOUT_TRANSMIT, ¬ify_ready,
+ p1);