aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c9
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c36
2 files changed, 25 insertions, 20 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index e2aab338b..10a2f834c 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -1453,9 +1453,8 @@ log_message (const struct GNUNET_MessageHeader *message,
1453 const struct GNUNET_PeerIdentity *peer, 1453 const struct GNUNET_PeerIdentity *peer,
1454 const struct GNUNET_HashCode *hash) 1454 const struct GNUNET_HashCode *hash)
1455{ 1455{
1456 LOG (GNUNET_ERROR_TYPE_INFO, "<- %s from %s on connection %s\n", 1456 LOG (GNUNET_ERROR_TYPE_INFO, "<- %s on connection %s from %s\n",
1457 GM_m2s (ntohs (message->type)), GNUNET_i2s (peer), 1457 GM_m2s (ntohs (message->type)), GNUNET_h2s (hash), GNUNET_i2s (peer));
1458 GNUNET_h2s (hash));
1459} 1458}
1460 1459
1461/******************************************************************************/ 1460/******************************************************************************/
@@ -2805,8 +2804,8 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
2805 data = GNUNET_malloc (size); 2804 data = GNUNET_malloc (size);
2806 memcpy (data, message, size); 2805 memcpy (data, message, size);
2807 type = ntohs (message->type); 2806 type = ntohs (message->type);
2808 LOG (GNUNET_ERROR_TYPE_INFO, "-> %s (%u bytes) on connection %s\n", 2807 LOG (GNUNET_ERROR_TYPE_INFO, "-> %s on connection %s (%u bytes)\n",
2809 GM_m2s (type), size, GMC_2s (c)); 2808 GM_m2s (type), GMC_2s (c), size);
2810 2809
2811 fc = fwd ? &c->fwd_fc : &c->bck_fc; 2810 fc = fwd ? &c->fwd_fc : &c->bck_fc;
2812 droppable = GNUNET_NO == force; 2811 droppable = GNUNET_NO == force;
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c
index 7f74ad65b..0b2fdff07 100644
--- a/src/mesh/gnunet-service-mesh_peer.c
+++ b/src/mesh/gnunet-service-mesh_peer.c
@@ -882,16 +882,17 @@ queue_send (void *cls, size_t size, void *buf)
882 /* Check if buffer size is enough for the message */ 882 /* Check if buffer size is enough for the message */
883 if (queue->size > size) 883 if (queue->size > size)
884 { 884 {
885 LOG (GNUNET_ERROR_TYPE_DEBUG, "* not enough room, reissue\n"); 885 LOG (GNUNET_ERROR_TYPE_WARNING, "not enough room (%u vs %u), reissue\n",
886 peer->core_transmit = 886 queue->size, size);
887 GNUNET_CORE_notify_transmit_ready (core_handle, 887 peer->core_transmit =
888 GNUNET_NO, get_priority (queue), 888 GNUNET_CORE_notify_transmit_ready (core_handle,
889 GNUNET_TIME_UNIT_FOREVER_REL, 889 GNUNET_NO, get_priority (queue),
890 dst_id, 890 GNUNET_TIME_UNIT_FOREVER_REL,
891 queue->size, 891 dst_id,
892 &queue_send, 892 queue->size,
893 peer); 893 &queue_send,
894 return 0; 894 peer);
895 return 0;
895 } 896 }
896 LOG (GNUNET_ERROR_TYPE_DEBUG, "* size %u ok\n", queue->size); 897 LOG (GNUNET_ERROR_TYPE_DEBUG, "* size %u ok\n", queue->size);
897 898
@@ -939,11 +940,16 @@ queue_send (void *cls, size_t size, void *buf)
939 if (0 < drop_percent && 940 if (0 < drop_percent &&
940 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 101) < drop_percent) 941 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 101) < drop_percent)
941 { 942 {
942 LOG (GNUNET_ERROR_TYPE_WARNING, 943 LOG (GNUNET_ERROR_TYPE_WARNING, "DD %s on connection\n",
943 "Dropping message of type %s\n", 944 GM_m2s (queue->type), GMC_2s (c));
944 GM_m2s (queue->type));
945 data_size = 0; 945 data_size = 0;
946 } 946 }
947 else
948 {
949 LOG (GNUNET_ERROR_TYPE_INFO,
950 "ss %s on connection %s (%p) %s (size %u)\n",
951 GM_m2s (queue->type), GMC_2s (c), c, GM_f2s (queue->fwd), data_size);
952 }
947 953
948 /* Free queue, but cls was freed by send_core_* */ 954 /* Free queue, but cls was freed by send_core_* */
949 GMP_queue_destroy (queue, GNUNET_NO); 955 GMP_queue_destroy (queue, GNUNET_NO);
@@ -1073,8 +1079,8 @@ GMP_queue_add (struct MeshPeer *peer, void *cls, uint16_t type, size_t size,
1073 int priority; 1079 int priority;
1074 int call_core; 1080 int call_core;
1075 1081
1076 LOG (GNUNET_ERROR_TYPE_INFO, "qq %s %s towards %s (size %u) on c %p (%s)\n", 1082 LOG (GNUNET_ERROR_TYPE_INFO, "qq %s on connection %s (%p) %s towards %s (size %u)\n",
1077 GM_m2s (type), GM_f2s (fwd), GMP_2s(peer), size, c, GMC_2s (c)); 1083 GM_m2s (type), GMC_2s (c), c, GM_f2s (fwd), GMP_2s(peer), size);
1078 1084
1079 if (NULL == peer->connections) 1085 if (NULL == peer->connections)
1080 { 1086 {