-static void
-exchange_hello_last (void *cls,
- const struct GNUNET_MessageHeader *message)
-{
- struct PeerContext *me = cls;
-
- GNUNET_TRANSPORT_get_hello_cancel (p2.th, &exchange_hello_last, me);
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Exchanging HELLO with peer (%p)!\n", cls);
- GNUNET_assert (ok >= 3);
- OKPP;
- GNUNET_assert (message != NULL);
- GNUNET_assert (GNUNET_OK ==
- GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *)
- message, &me->id));
-
- /* Can't we get away with only offering one hello? */
- /* GNUNET_TRANSPORT_offer_hello (p1.th, message); */
-
- /*sleep(1);*/ /* Make sure we are not falling prey to the "favorable timing" bug... */
-
- /* both HELLOs exchanged, get ready to test transmission! */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Finished exchanging HELLOs, now waiting for transmission!\n");
+ th = GNUNET_TRANSPORT_notify_transmit_ready (p1->th, &p2->id, 256, 0,
+ TIMEOUT_TRANSMIT, ¬ify_ready,
+ &p1);