X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftransport%2Ftest_transport_api_monitor_peers.c;h=4a0f1a23f62d7b03dcf15f3806647927caf935ba;hb=5126e9d42b24a0a6cf26de79b65bcd23790dee9b;hp=37f50c4fcacb66f4412f91db872f6b2ece4b4116;hpb=d0701eb6315fc3f5aca74415bbf0ff7418409f87;p=oweals%2Fgnunet.git diff --git a/src/transport/test_transport_api_monitor_peers.c b/src/transport/test_transport_api_monitor_peers.c index 37f50c4fc..4a0f1a23f 100644 --- a/src/transport/test_transport_api_monitor_peers.c +++ b/src/transport/test_transport_api_monitor_peers.c @@ -39,8 +39,6 @@ #define TEST_MESSAGE_TYPE 12345 -static struct GNUNET_TRANSPORT_TransmitHandle *th; - static struct GNUNET_TRANSPORT_TESTING_ConnectCheckContext *ccc; static struct GNUNET_TRANSPORT_PeerMonitoringContext *pmc_p1; @@ -59,11 +57,6 @@ static int p2_c_notify; static void custom_shutdown (void *cls) { - if (th != NULL) - { - GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); - th = NULL; - } if (NULL != pmc_p1) { GNUNET_TRANSPORT_monitor_peers_cancel (pmc_p1); @@ -139,22 +132,6 @@ notify_connect (void *cls, } -static void -notify_disconnect (void *cls, - struct GNUNET_TRANSPORT_TESTING_PeerContext *me, - const struct GNUNET_PeerIdentity *other) -{ - GNUNET_TRANSPORT_TESTING_log_disconnect (cls, - me, - other); - if (NULL != th) - { - GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); - th = NULL; - } -} - - static void monitor1_cb (void *cls, const struct GNUNET_PeerIdentity *peer, @@ -230,7 +207,7 @@ main (int argc, char *argv[]) .config_file = "test_transport_api_data.conf", .rec = ¬ify_receive, .nc = ¬ify_connect, - .nd = ¬ify_disconnect, + .nd = &GNUNET_TRANSPORT_TESTING_log_disconnect, .shutdown_task = &custom_shutdown, .timeout = TIMEOUT };