diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-16 19:44:19 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-16 19:44:19 +0000 |
commit | aed4626fc179259154c05413717076de7c85b1a7 (patch) | |
tree | 650dac83e741427225656091044d456099b884b0 | |
parent | a851f81bf5cc961c1ca66c0f0f8776d6c7043de7 (diff) | |
download | gnunet-aed4626fc179259154c05413717076de7c85b1a7.tar.gz gnunet-aed4626fc179259154c05413717076de7c85b1a7.zip |
- don't show WARNING/ERROR on wrong connection create, debug+statistics instead
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 10 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_peer.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 309d51e6e..a703e4b96 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -1275,9 +1275,8 @@ GMC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1275 | msg = (struct GNUNET_MESH_ConnectionCreate *) message; | 1275 | msg = (struct GNUNET_MESH_ConnectionCreate *) message; |
1276 | cid = &msg->cid; | 1276 | cid = &msg->cid; |
1277 | id = (struct GNUNET_PeerIdentity *) &msg[1]; | 1277 | id = (struct GNUNET_PeerIdentity *) &msg[1]; |
1278 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1278 | LOG (GNUNET_ERROR_TYPE_DEBUG, " connection %s (%s->).\n", |
1279 | " connection %s (%s).\n", | 1279 | GNUNET_h2s (cid), GNUNET_i2s (id)); |
1280 | GNUNET_h2s (cid), GNUNET_i2s (id)); | ||
1281 | 1280 | ||
1282 | /* Create connection */ | 1281 | /* Create connection */ |
1283 | c = connection_get (cid); | 1282 | c = connection_get (cid); |
@@ -1352,7 +1351,8 @@ GMC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1352 | LOG (GNUNET_ERROR_TYPE_DEBUG, " Retransmitting.\n"); | 1351 | LOG (GNUNET_ERROR_TYPE_DEBUG, " Retransmitting.\n"); |
1353 | GMP_add_path (dest_peer, path_duplicate (path), GNUNET_NO); | 1352 | GMP_add_path (dest_peer, path_duplicate (path), GNUNET_NO); |
1354 | GMP_add_path_to_origin (orig_peer, path_duplicate (path), GNUNET_NO); | 1353 | GMP_add_path_to_origin (orig_peer, path_duplicate (path), GNUNET_NO); |
1355 | GMC_send_prebuilt_message (message, c, GNUNET_YES, GNUNET_YES, NULL, NULL); | 1354 | GMC_send_prebuilt_message (message, c, GNUNET_YES, GNUNET_YES, |
1355 | NULL, NULL); | ||
1356 | } | 1356 | } |
1357 | path_destroy (path); | 1357 | path_destroy (path); |
1358 | return GNUNET_OK; | 1358 | return GNUNET_OK; |
@@ -2705,7 +2705,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
2705 | &message_sent, q); | 2705 | &message_sent, q); |
2706 | if (NULL == q->q) | 2706 | if (NULL == q->q) |
2707 | { | 2707 | { |
2708 | GNUNET_break (0); | 2708 | LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING dropping msg on %s\n", GMC_2s (c)); |
2709 | GNUNET_free (data); | 2709 | GNUNET_free (data); |
2710 | GNUNET_free (q); | 2710 | GNUNET_free (q); |
2711 | return NULL; | 2711 | return NULL; |
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index aa9f52fe6..5f41725ce 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c | |||
@@ -997,7 +997,9 @@ GMP_queue_add (struct MeshPeer *peer, void *cls, uint16_t type, size_t size, | |||
997 | if (NULL == peer->connections) | 997 | if (NULL == peer->connections) |
998 | { | 998 | { |
999 | /* We are not connected to this peer, ignore request. */ | 999 | /* We are not connected to this peer, ignore request. */ |
1000 | GNUNET_break_op (0); | 1000 | LOG (GNUNET_ERROR_TYPE_DEBUG, "WARNING %s not a neighbor\n", GMP_2s (peer)); |
1001 | GNUNET_STATISTICS_update (stats, "# messages dropped due to wrong hop", 1, | ||
1002 | GNUNET_NO); | ||
1001 | return NULL; | 1003 | return NULL; |
1002 | } | 1004 | } |
1003 | 1005 | ||