aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-08 20:23:17 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-08 20:23:17 +0000
commit5bd842322651a8e76d8a08abe598a5572184906e (patch)
treef74a1010f76395c99467a607511caf6cae5c7ab0 /src
parent79f5075307fb462d6b1c809e8d0fdc667ed33b0e (diff)
downloadgnunet-5bd842322651a8e76d8a08abe598a5572184906e.tar.gz
gnunet-5bd842322651a8e76d8a08abe598a5572184906e.zip
-run unregister even if path is NULL, do check uniqueness
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c4
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 54c82a837..e39017675 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -2736,7 +2736,7 @@ GCC_new (const struct GNUNET_CADET_Hash *cid,
2736 c->own_pos = own_pos; 2736 c->own_pos = own_pos;
2737 c->path = p; 2737 c->path = p;
2738 p->c = c; 2738 p->c = c;
2739 2739 GNUNET_assert (NULL != p);
2740 if (GNUNET_OK != register_neighbors (c)) 2740 if (GNUNET_OK != register_neighbors (c))
2741 { 2741 {
2742 if (0 == own_pos) 2742 if (0 == own_pos)
@@ -2782,8 +2782,8 @@ GCC_destroy (struct CadetConnection *c)
2782 { 2782 {
2783 connection_cancel_queues (c, GNUNET_YES); 2783 connection_cancel_queues (c, GNUNET_YES);
2784 connection_cancel_queues (c, GNUNET_NO); 2784 connection_cancel_queues (c, GNUNET_NO);
2785 unregister_neighbors (c);
2786 } 2785 }
2786 unregister_neighbors (c);
2787 2787
2788 /* Cancel maintainance task (keepalive/timeout) */ 2788 /* Cancel maintainance task (keepalive/timeout) */
2789 if (NULL != c->fwd_fc.poll_msg) 2789 if (NULL != c->fwd_fc.poll_msg)
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index e5f6c3a26..41f7a363d 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -1962,7 +1962,7 @@ GCP_add_connection (struct CadetPeer *peer,
1962 GNUNET_CONTAINER_multihashmap_put (peer->connections, 1962 GNUNET_CONTAINER_multihashmap_put (peer->connections,
1963 GCC_get_h (c), 1963 GCC_get_h (c),
1964 c, 1964 c,
1965 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); 1965 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
1966 LOG (GNUNET_ERROR_TYPE_DEBUG, 1966 LOG (GNUNET_ERROR_TYPE_DEBUG,
1967 " now has %u connections.\n", 1967 " now has %u connections.\n",
1968 GNUNET_CONTAINER_multihashmap_size (peer->connections)); 1968 GNUNET_CONTAINER_multihashmap_size (peer->connections));