- {
- GNUNET_assert (ok == 3);
- OKPP;
- GNUNET_assert (cls == &p2);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Asking core (1) for transmission to peer `%4s'\n",
- GNUNET_i2s (&p2.id));
- GNUNET_CORE_notify_transmit_ready (p1.ch,
- 0,
- TIMEOUT,
- &p2.id,
- sizeof (struct GNUNET_MessageHeader),
- &transmit_ready, &p1);
-
- }
-}
-
-
-static void
-process_hello (void *cls,
- struct GNUNET_TIME_Relative latency,
- const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader *message)
-{
- struct PeerContext *p = cls;
-
- GNUNET_assert (peer != NULL);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received (my) `%s' from transport service of `%4s'\n",
- "HELLO", GNUNET_i2s (peer));
- GNUNET_assert (message != NULL);
- p->hello = GNUNET_malloc (ntohs (message->size));
- memcpy (p->hello, message, ntohs (message->size));
- if ((p == &p1) && (p2.th != NULL))
- GNUNET_TRANSPORT_offer_hello (p2.th, message);
- if ((p == &p2) && (p1.th != NULL))
- GNUNET_TRANSPORT_offer_hello (p1.th, message);
-
- if ((p == &p1) && (p2.hello != NULL))
- GNUNET_TRANSPORT_offer_hello (p1.th, p2.hello);
- if ((p == &p2) && (p1.hello != NULL))
- GNUNET_TRANSPORT_offer_hello (p2.th, p1.hello);