From: Bart Polot Date: Tue, 17 Dec 2013 00:06:15 +0000 (+0000) Subject: - refine break condition X-Git-Tag: initial-import-from-subversion-38251~5410 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dfa03935894555dcb753656b3c3d68c32ecc0398;p=oweals%2Fgnunet.git - refine break condition --- diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 0f81a3460..33ae8361c 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -1186,8 +1186,8 @@ unregister_neighbors (struct MeshConnection *c) peer = get_next_hop (c); if (GNUNET_OK != GMP_remove_connection (peer, c)) { - GNUNET_break (MESH_CONNECTION_NEW == c->state/* - || MESH_CONNECTION_DESTROYED == c->state*/); + GNUNET_break (MESH_CONNECTION_NEW == c->state + || MESH_CONNECTION_DESTROYED == c->state); LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); if (NULL != c->t) GMT_debug (c->t); } @@ -1195,8 +1195,8 @@ unregister_neighbors (struct MeshConnection *c) peer = get_prev_hop (c); if (GNUNET_OK != GMP_remove_connection (peer, c)) { - GNUNET_break (MESH_CONNECTION_NEW == c->state/* - || MESH_CONNECTION_DESTROYED == c->state*/); + GNUNET_break (MESH_CONNECTION_NEW == c->state + || MESH_CONNECTION_DESTROYED == c->state); LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); if (NULL != c->t) GMT_debug (c->t); } diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index f1ade4031..39006919d 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c @@ -225,6 +225,8 @@ notify_broken (void *cls, struct MeshPeer *peer = cls; struct MeshConnection *c = value; + LOG (GNUNET_ERROR_TYPE_DEBUG, " notifying %s due to %s\n", + GMC_2s (c), GMP_2s (peer)); GMC_notify_broken (c, peer); return GNUNET_YES; @@ -287,7 +289,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) return; } if (myid == p->id) - LOG (GNUNET_ERROR_TYPE_DEBUG, " (self)\n"); + LOG (GNUNET_ERROR_TYPE_DEBUG, " (self: %s)\n", GMP_2s (p)); else LOG (GNUNET_ERROR_TYPE_DEBUG, " %s\n", GMP_2s (p));