diff options
author | Bart Polot <bart@net.in.tum.de> | 2016-05-03 18:38:43 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2016-05-03 18:38:43 +0000 |
commit | 5954f4cbe01c78fff5a5242e8ff91c0a1c65c4e1 (patch) | |
tree | bda39004f656fec6c3db934ae8ef69935752d924 /src/cadet | |
parent | eb62ee6803ca2404c04271eeddbbc7cf89ecd07d (diff) | |
download | gnunet-5954f4cbe01c78fff5a5242e8ff91c0a1c65c4e1.tar.gz gnunet-5954f4cbe01c78fff5a5242e8ff91c0a1c65c4e1.zip |
Fix shutdown assertion failure in core_api: avoid double cancel of pending traffic
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 46961250b..ee8f9652f 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -775,8 +775,6 @@ peer_destroy (struct CadetPeer *peer) | |||
775 | GNUNET_assert (0 == GNUNET_CONTAINER_multihashmap_size (peer->connections)); | 775 | GNUNET_assert (0 == GNUNET_CONTAINER_multihashmap_size (peer->connections)); |
776 | GNUNET_CONTAINER_multihashmap_destroy (peer->connections); | 776 | GNUNET_CONTAINER_multihashmap_destroy (peer->connections); |
777 | } | 777 | } |
778 | if (NULL != peer->core_transmit) | ||
779 | GNUNET_CORE_notify_transmit_ready_cancel (peer->core_transmit); | ||
780 | if (NULL != peer->hello_offer) | 778 | if (NULL != peer->hello_offer) |
781 | { | 779 | { |
782 | GNUNET_TRANSPORT_offer_hello_cancel (peer->hello_offer); | 780 | GNUNET_TRANSPORT_offer_hello_cancel (peer->hello_offer); |
@@ -791,6 +789,13 @@ peer_destroy (struct CadetPeer *peer) | |||
791 | { | 789 | { |
792 | GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0); | 790 | GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0); |
793 | } | 791 | } |
792 | if (NULL != peer->core_transmit) | ||
793 | { | ||
794 | GNUNET_break (0); /* GCP_queue_destroy should've cancelled it! */ | ||
795 | GNUNET_CORE_notify_transmit_ready_cancel (peer->core_transmit); | ||
796 | peer->core_transmit = NULL; | ||
797 | } | ||
798 | |||
794 | GNUNET_free_non_null (peer->hello); | 799 | GNUNET_free_non_null (peer->hello); |
795 | GNUNET_free (peer); | 800 | GNUNET_free (peer); |
796 | return GNUNET_OK; | 801 | return GNUNET_OK; |