aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh_api_new.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-10-17 16:43:24 +0000
committerBart Polot <bart@net.in.tum.de>2011-10-17 16:43:24 +0000
commit27f9286f3ad311c5aa0463fdbb87dd56fe09b03f (patch)
treef676aca9911355eb24a0b8bbb3f392aff5ea6556 /src/mesh/mesh_api_new.c
parentfaae173a9a2190c3af44c5fe1f79937bfa9dd82d (diff)
downloadgnunet-27f9286f3ad311c5aa0463fdbb87dd56fe09b03f.tar.gz
gnunet-27f9286f3ad311c5aa0463fdbb87dd56fe09b03f.zip
Added debug info for multicast
Diffstat (limited to 'src/mesh/mesh_api_new.c')
-rw-r--r--src/mesh/mesh_api_new.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c
index fda4e916f..b3037e562 100644
--- a/src/mesh/mesh_api_new.c
+++ b/src/mesh/mesh_api_new.c
@@ -1036,12 +1036,6 @@ send_callback (void *cls, size_t size, void *buf)
1036 tsize = 0; 1036 tsize = 0;
1037 while ((NULL != (th = h->th_head)) && (size >= th->size)) 1037 while ((NULL != (th = h->th_head)) && (size >= th->size))
1038 { 1038 {
1039#if DEBUG
1040 LOG (GNUNET_ERROR_TYPE_DEBUG, "mesh: type: %u\n",
1041 ntohs (((struct GNUNET_MessageHeader *) &th[1])->type));
1042 LOG (GNUNET_ERROR_TYPE_DEBUG, "mesh: size: %u\n",
1043 ntohs (((struct GNUNET_MessageHeader *) &th[1])->size));
1044#endif
1045 if (NULL != th->notify) 1039 if (NULL != th->notify)
1046 { 1040 {
1047 if (th->tunnel->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV) 1041 if (th->tunnel->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
@@ -1076,6 +1070,9 @@ send_callback (void *cls, size_t size, void *buf)
1076 GNUNET_assert (size >= th->size); 1070 GNUNET_assert (size >= th->size);
1077 psize = 1071 psize =
1078 th->notify (th->notify_cls, size - sizeof (mc), &cbuf[sizeof (mc)]); 1072 th->notify (th->notify_cls, size - sizeof (mc), &cbuf[sizeof (mc)]);
1073 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1074 "mesh: multicast, type %u\n",
1075 ntohs (mh->type));
1079 if (psize > 0) 1076 if (psize > 0)
1080 { 1077 {
1081 mc.header.size = htons (sizeof (mc) + th->size); 1078 mc.header.size = htons (sizeof (mc) + th->size);
@@ -1468,12 +1465,17 @@ GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
1468 uint32_t least_priority; 1465 uint32_t least_priority;
1469 size_t overhead; 1466 size_t overhead;
1470 1467
1468#if DEBUG
1471 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1469 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1472 "mesh: mesh notify transmit ready called\n"); 1470 "mesh: mesh notify transmit ready called\n");
1473 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1471 if (NULL != target)
1474 "mesh: target %s\n", 1472 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1475 GNUNET_i2s (target)); 1473 "mesh: target %s\n",
1476 1474 GNUNET_i2s (target));
1475 else
1476 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1477 "mesh: target multicast\n");
1478#endif
1477 GNUNET_assert (NULL != notify); 1479 GNUNET_assert (NULL != notify);
1478 if (tunnel->mesh->npackets >= tunnel->mesh->max_queue_size && 1480 if (tunnel->mesh->npackets >= tunnel->mesh->max_queue_size &&
1479 tunnel->npackets > 0) 1481 tunnel->npackets > 0)