From: Matthias Wachs Date: Mon, 20 Jun 2011 11:44:11 +0000 (+0000) Subject: fixing assertion transport_api_new.c:379 X-Git-Tag: initial-import-from-subversion-38251~18071 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5175505389b7ad8345cee069094b4e459d6d0204;p=oweals%2Fgnunet.git fixing assertion transport_api_new.c:379 --- diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 4af8a24f9..7fc9d43b4 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c @@ -333,7 +333,8 @@ notify_ready (void *cls, size_t size, void *buf) while (size - ret >= s); if (n < TOTAL_MSGS) { - th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th, + if (th_p2 == NULL) + th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th, &p1.id, s, 0, TIMEOUT, ¬ify_ready, @@ -360,6 +361,8 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) "Peer `%4s' disconnected (%p)!\n", GNUNET_i2s (peer), cls); #endif + if (th_p2 != NULL) + GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2); } diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c index b717cb8a0..a482edda0 100644 --- a/src/transport/test_transport_api_unreliability.c +++ b/src/transport/test_transport_api_unreliability.c @@ -457,6 +457,8 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) "Peer `%4s' disconnected (%p)!\n", GNUNET_i2s (peer), cls); #endif + if (th_p2 != NULL) + GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2); }