aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/test_transport_api_reliability.c5
-rw-r--r--src/transport/test_transport_api_unreliability.c2
2 files changed, 6 insertions, 1 deletions
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)
333 while (size - ret >= s); 333 while (size - ret >= s);
334 if (n < TOTAL_MSGS) 334 if (n < TOTAL_MSGS)
335 { 335 {
336 th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th, 336 if (th_p2 == NULL)
337 th_p2 = GNUNET_TRANSPORT_notify_transmit_ready (p2.th,
337 &p1.id, 338 &p1.id,
338 s, 0, TIMEOUT, 339 s, 0, TIMEOUT,
339 &notify_ready, 340 &notify_ready,
@@ -360,6 +361,8 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
360 "Peer `%4s' disconnected (%p)!\n", 361 "Peer `%4s' disconnected (%p)!\n",
361 GNUNET_i2s (peer), cls); 362 GNUNET_i2s (peer), cls);
362#endif 363#endif
364 if (th_p2 != NULL)
365 GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
363} 366}
364 367
365 368
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)
457 "Peer `%4s' disconnected (%p)!\n", 457 "Peer `%4s' disconnected (%p)!\n",
458 GNUNET_i2s (peer), cls); 458 GNUNET_i2s (peer), cls);
459#endif 459#endif
460 if (th_p2 != NULL)
461 GNUNET_TRANSPORT_notify_transmit_ready_cancel(th_p2);
460} 462}
461 463
462 464