- "Timeout occurred while waiting for transmit_ready\n");
- GNUNET_SCHEDULER_shutdown ();
- ccc->global_ret = 42;
- return 0;
- }
-
- GNUNET_assert (size >= TEST_MESSAGE_SIZE);
- memset (buf, '\0', TEST_MESSAGE_SIZE);
- hdr = buf;
- hdr->size = htons (TEST_MESSAGE_SIZE);
- hdr->type = htons (TEST_MESSAGE_TYPE);
-
- {
- char *ps = GNUNET_strdup (GNUNET_i2s (&ccc->p[1]->id));
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Peer %u (`%s') sending message with type %u and size %u bytes to peer %u (`%s')\n",
- ccc->p[1]->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)
-{
- if (NULL == send_task)
- ccc->global_ret = GNUNET_NO; /* first call! */
- send_task = NULL;
- {
- char *receiver_s = GNUNET_strdup (GNUNET_i2s (&ccc->p[0]->id));
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
- ccc->p[1]->no, GNUNET_i2s (&ccc->p[1]->id), ccc->p[0]->no, receiver_s);
- GNUNET_free (receiver_s);
- }
- if (0 == messages_recv)
- {
- start_normal = GNUNET_TIME_absolute_get();
- }
- if (1 == messages_recv)
- {
- start_delayed = GNUNET_TIME_absolute_get();