- GNUNET_assert ((ok == 5) || (ok == 6));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Encrypted connection established to peer `%4s'\n",
- GNUNET_i2s (peer));
+ struct PeerContext *pc = cls;
+
+ if (0 == memcmp (&pc->id,
+ peer,
+ sizeof (struct GNUNET_PeerIdentity)))
+ return;
+ GNUNET_assert (pc->connect_status == 0);
+ pc->connect_status = 1;
+ if (pc == &p1)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Encrypted connection established to peer `%4s'\n",
+ GNUNET_i2s (peer));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Asking core (1) for transmission to peer `%4s'\n",
+ GNUNET_i2s (&p2.id));
+ if (NULL == GNUNET_CORE_notify_transmit_ready (p1.ch,
+ GNUNET_YES,
+ 0,
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 45),
+ &p2.id,
+ sizeof (struct GNUNET_MessageHeader),
+ &transmit_ready, &p1))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "RECEIVED NULL when asking core (1) for transmission to peer `%4s'\n",
+ GNUNET_i2s (&p2.id));
+ }
+ }