aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-06-24 14:13:53 +0000
committerBart Polot <bart@net.in.tum.de>2015-06-24 14:13:53 +0000
commit048d5a19aee28ac126612b2e9dbb1529a3a75225 (patch)
treecbad5343175be922d2e16b2ce025269b95ea4a24
parent72e6524fa7fc569ae441ae9989550b27e22d45fd (diff)
downloadgnunet-048d5a19aee28ac126612b2e9dbb1529a3a75225.tar.gz
gnunet-048d5a19aee28ac126612b2e9dbb1529a3a75225.zip
- check connections on peer destroy
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 2925b5e65..3a2cfe5b8 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -737,6 +737,11 @@ peer_destroy (struct CadetPeer *peer)
737 } 737 }
738 if (NULL != peer->tunnel) 738 if (NULL != peer->tunnel)
739 GCT_destroy_empty (peer->tunnel); 739 GCT_destroy_empty (peer->tunnel);
740 if (NULL != peer->connections)
741 {
742 GNUNET_assert (0 == GNUNET_CONTAINER_multihashmap_size (peer->connections));
743 GNUNET_CONTAINER_multihashmap_destroy (peer->connections);
744 }
740 GNUNET_free_non_null (peer->hello); 745 GNUNET_free_non_null (peer->hello);
741 GNUNET_free (peer); 746 GNUNET_free (peer);
742 return GNUNET_OK; 747 return GNUNET_OK;
@@ -2184,7 +2189,7 @@ GCP_remove_connection (struct CadetPeer *peer,
2184 GCC_get_h (c), 2189 GCC_get_h (c),
2185 c)); 2190 c));
2186 LOG (GNUNET_ERROR_TYPE_DEBUG, 2191 LOG (GNUNET_ERROR_TYPE_DEBUG,
2187 "Peer %s reamins with %u connections.\n", 2192 "Peer %s remains with %u connections.\n",
2188 GCP_2s (peer), 2193 GCP_2s (peer),
2189 GNUNET_CONTAINER_multihashmap_size (peer->connections)); 2194 GNUNET_CONTAINER_multihashmap_size (peer->connections));
2190} 2195}