-
- if (blacklist_p2 != NULL)
- GNUNET_TRANSPORT_blacklist_cancel (blacklist_p2);
-
- if (p1 != NULL)
- GNUNET_TRANSPORT_TESTING_stop_peer (tth, p1);
- if (p2 != NULL)
- GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
-
- ok = GNUNET_SYSERR;
-}
-
-
-static void
-notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
-{
- struct PeerContext *p = cls;
- struct PeerContext *t = NULL;
-
- if (0 == memcmp (peer, &p1->id, sizeof (struct GNUNET_PeerIdentity)))
- t = p1;
- if (0 == memcmp (peer, &p2->id, sizeof (struct GNUNET_PeerIdentity)))
- t = p2;
- GNUNET_assert (t != NULL);
-
- char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
- p->no, ps, ntohs (message->type), ntohs (message->size), t->no,
- GNUNET_i2s (&t->id));
- GNUNET_free (ps);
-
- if ((TEST_MESSAGE_TYPE == ntohs (message->type)) &&
- (TEST_MESSAGE_SIZE == ntohs (message->size)))
- {
- ok = 0;
- shutdown_task = GNUNET_SCHEDULER_add_now(&end, NULL);