diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-09 14:28:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-09 14:28:05 +0000 |
commit | e39c250461bdbc5e251d63cb7e3c310c1b7df2b5 (patch) | |
tree | 7d9317e256ea95b83dbd43b30abbce6ac6437d5f /src | |
parent | cff8dd1f42b259641803eb0a60143ab93a0eaa0c (diff) | |
download | gnunet-e39c250461bdbc5e251d63cb7e3c310c1b7df2b5.tar.gz gnunet-e39c250461bdbc5e251d63cb7e3c310c1b7df2b5.zip |
cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 00e0a9fa3..51e856804 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -341,7 +341,6 @@ struct Plugin | |||
341 | */ | 341 | */ |
342 | int broadcast; | 342 | int broadcast; |
343 | 343 | ||
344 | |||
345 | /** | 344 | /** |
346 | * Tokenizer for inbound messages. | 345 | * Tokenizer for inbound messages. |
347 | */ | 346 | */ |
@@ -515,6 +514,9 @@ destroy_session (void *cls, const GNUNET_HashCode * key, void *value) | |||
515 | { | 514 | { |
516 | struct Session *peer_session = value; | 515 | struct Session *peer_session = value; |
517 | 516 | ||
517 | GNUNET_assert (GNUNET_YES == | ||
518 | GNUNET_CONTAINER_multihashmap_remove (peer_session->plugin->sessions, | ||
519 | &peer_session->target.hashPubKey, peer_session)); | ||
518 | if (peer_session->frag != NULL) | 520 | if (peer_session->frag != NULL) |
519 | GNUNET_FRAGMENT_context_destroy (peer_session->frag); | 521 | GNUNET_FRAGMENT_context_destroy (peer_session->frag); |
520 | if (GNUNET_SCHEDULER_NO_TASK != peer_session->delayed_cont_task) | 522 | if (GNUNET_SCHEDULER_NO_TASK != peer_session->delayed_cont_task) |
@@ -523,6 +525,7 @@ destroy_session (void *cls, const GNUNET_HashCode * key, void *value) | |||
523 | return GNUNET_OK; | 525 | return GNUNET_OK; |
524 | } | 526 | } |
525 | 527 | ||
528 | |||
526 | /** | 529 | /** |
527 | * Destroy a session, plugin is being unloaded. | 530 | * Destroy a session, plugin is being unloaded. |
528 | * | 531 | * |
@@ -540,11 +543,12 @@ destroy_inbound_session (void *cls, const GNUNET_HashCode * key, void *value) | |||
540 | GNUNET_SCHEDULER_cancel (s->invalidation_task); | 543 | GNUNET_SCHEDULER_cancel (s->invalidation_task); |
541 | if (GNUNET_SCHEDULER_NO_TASK != s->delayed_cont_task) | 544 | if (GNUNET_SCHEDULER_NO_TASK != s->delayed_cont_task) |
542 | GNUNET_SCHEDULER_cancel (s->delayed_cont_task); | 545 | GNUNET_SCHEDULER_cancel (s->delayed_cont_task); |
543 | GNUNET_CONTAINER_multihashmap_remove(s->plugin->inbound_sessions, &s->target.hashPubKey, s); | 546 | GNUNET_CONTAINER_multihashmap_remove (s->plugin->inbound_sessions, &s->target.hashPubKey, s); |
544 | GNUNET_free (s); | 547 | GNUNET_free (s); |
545 | return GNUNET_OK; | 548 | return GNUNET_OK; |
546 | } | 549 | } |
547 | 550 | ||
551 | |||
548 | /** | 552 | /** |
549 | * Disconnect from a remote node. Clean up session if we have one for this peer | 553 | * Disconnect from a remote node. Clean up session if we have one for this peer |
550 | * | 554 | * |
@@ -569,9 +573,6 @@ udp_disconnect (void *cls, const struct GNUNET_PeerIdentity *target) | |||
569 | GNUNET_CONTAINER_multihashmap_get_multiple (plugin->inbound_sessions, | 573 | GNUNET_CONTAINER_multihashmap_get_multiple (plugin->inbound_sessions, |
570 | &target->hashPubKey, | 574 | &target->hashPubKey, |
571 | &destroy_inbound_session, NULL); | 575 | &destroy_inbound_session, NULL); |
572 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "sendto"); | ||
573 | |||
574 | |||
575 | plugin->last_expected_delay = GNUNET_FRAGMENT_context_destroy (session->frag); | 576 | plugin->last_expected_delay = GNUNET_FRAGMENT_context_destroy (session->frag); |
576 | if (GNUNET_SCHEDULER_NO_TASK != session->delayed_cont_task) | 577 | if (GNUNET_SCHEDULER_NO_TASK != session->delayed_cont_task) |
577 | GNUNET_SCHEDULER_cancel (session->delayed_cont_task); | 578 | GNUNET_SCHEDULER_cancel (session->delayed_cont_task); |