diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-17 00:06:15 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-17 00:06:15 +0000 |
commit | dfa03935894555dcb753656b3c3d68c32ecc0398 (patch) | |
tree | f8774b8d0c97f82175091ae26d97a330ed6ca4d7 | |
parent | 257a01eb8798b65c5ac86e317e5ed4b9f1b0b21b (diff) | |
download | gnunet-dfa03935894555dcb753656b3c3d68c32ecc0398.tar.gz gnunet-dfa03935894555dcb753656b3c3d68c32ecc0398.zip |
- refine break condition
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 8 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 4 |
2 files changed, 7 insertions, 5 deletions
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) | |||
1186 | peer = get_next_hop (c); | 1186 | peer = get_next_hop (c); |
1187 | if (GNUNET_OK != GMP_remove_connection (peer, c)) | 1187 | if (GNUNET_OK != GMP_remove_connection (peer, c)) |
1188 | { | 1188 | { |
1189 | GNUNET_break (MESH_CONNECTION_NEW == c->state/* | 1189 | GNUNET_break (MESH_CONNECTION_NEW == c->state |
1190 | || MESH_CONNECTION_DESTROYED == c->state*/); | 1190 | || MESH_CONNECTION_DESTROYED == c->state); |
1191 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); | 1191 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); |
1192 | if (NULL != c->t) GMT_debug (c->t); | 1192 | if (NULL != c->t) GMT_debug (c->t); |
1193 | } | 1193 | } |
@@ -1195,8 +1195,8 @@ unregister_neighbors (struct MeshConnection *c) | |||
1195 | peer = get_prev_hop (c); | 1195 | peer = get_prev_hop (c); |
1196 | if (GNUNET_OK != GMP_remove_connection (peer, c)) | 1196 | if (GNUNET_OK != GMP_remove_connection (peer, c)) |
1197 | { | 1197 | { |
1198 | GNUNET_break (MESH_CONNECTION_NEW == c->state/* | 1198 | GNUNET_break (MESH_CONNECTION_NEW == c->state |
1199 | || MESH_CONNECTION_DESTROYED == c->state*/); | 1199 | || MESH_CONNECTION_DESTROYED == c->state); |
1200 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); | 1200 | LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate: %u\n", c->state); |
1201 | if (NULL != c->t) GMT_debug (c->t); | 1201 | if (NULL != c->t) GMT_debug (c->t); |
1202 | } | 1202 | } |
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, | |||
225 | struct MeshPeer *peer = cls; | 225 | struct MeshPeer *peer = cls; |
226 | struct MeshConnection *c = value; | 226 | struct MeshConnection *c = value; |
227 | 227 | ||
228 | LOG (GNUNET_ERROR_TYPE_DEBUG, " notifying %s due to %s\n", | ||
229 | GMC_2s (c), GMP_2s (peer)); | ||
228 | GMC_notify_broken (c, peer); | 230 | GMC_notify_broken (c, peer); |
229 | 231 | ||
230 | return GNUNET_YES; | 232 | return GNUNET_YES; |
@@ -287,7 +289,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
287 | return; | 289 | return; |
288 | } | 290 | } |
289 | if (myid == p->id) | 291 | if (myid == p->id) |
290 | LOG (GNUNET_ERROR_TYPE_DEBUG, " (self)\n"); | 292 | LOG (GNUNET_ERROR_TYPE_DEBUG, " (self: %s)\n", GMP_2s (p)); |
291 | else | 293 | else |
292 | LOG (GNUNET_ERROR_TYPE_DEBUG, " %s\n", GMP_2s (p)); | 294 | LOG (GNUNET_ERROR_TYPE_DEBUG, " %s\n", GMP_2s (p)); |
293 | 295 | ||