aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-07-15 11:45:10 +0000
committerBart Polot <bart@net.in.tum.de>2015-07-15 11:45:10 +0000
commit15c89f51a855319e027019f762fc8d51ddf06fef (patch)
tree9a654d54c7e7a4d844c1d2bd013f845506da7f3c /src
parent7f802a521a7726238437a24f3d0769139c3e0cbe (diff)
downloadgnunet-15c89f51a855319e027019f762fc8d51ddf06fef.tar.gz
gnunet-15c89f51a855319e027019f762fc8d51ddf06fef.zip
- improved logging of payload traffic
Diffstat (limited to 'src')
-rw-r--r--src/cadet/cadet_api.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index f15277fcd..353dd13c9 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -1327,7 +1327,8 @@ send_callback (void *cls, size_t size, void *buf)
1327 struct GNUNET_CADET_LocalData *dmsg; 1327 struct GNUNET_CADET_LocalData *dmsg;
1328 struct GNUNET_MessageHeader *mh; 1328 struct GNUNET_MessageHeader *mh;
1329 1329
1330 LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload\n"); 1330 LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload, %u bytes on %X (%p)\n",
1331 th->size, ch->chid, ch);
1331 if (GNUNET_NO == ch->allow_send) 1332 if (GNUNET_NO == ch->allow_send)
1332 { 1333 {
1333 /* This channel is not ready to transmit yet, Try the next message */ 1334 /* This channel is not ready to transmit yet, Try the next message */
@@ -1348,7 +1349,7 @@ send_callback (void *cls, size_t size, void *buf)
1348 dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA); 1349 dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA);
1349 dmsg->header.size = htons (psize); 1350 dmsg->header.size = htons (psize);
1350 dmsg->id = htonl (ch->chid); 1351 dmsg->id = htonl (ch->chid);
1351 LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload type %s\n", 1352 LOG (GNUNET_ERROR_TYPE_DEBUG, "# sending, type %s\n",
1352 GC_m2s (ntohs (mh->type))); 1353 GC_m2s (ntohs (mh->type)));
1353 ch->allow_send = GNUNET_NO; 1354 ch->allow_send = GNUNET_NO;
1354 } 1355 }
@@ -1394,7 +1395,7 @@ send_callback (void *cls, size_t size, void *buf)
1394 else 1395 else
1395 { 1396 {
1396 if (NULL != h->th_head) 1397 if (NULL != h->th_head)
1397 LOG (GNUNET_ERROR_TYPE_DEBUG, "# can't transmit any more\n"); 1398 LOG (GNUNET_ERROR_TYPE_DEBUG, "# nothing ready to transmit\n");
1398 else 1399 else
1399 LOG (GNUNET_ERROR_TYPE_DEBUG, "# nothing left to transmit\n"); 1400 LOG (GNUNET_ERROR_TYPE_DEBUG, "# nothing left to transmit\n");
1400 } 1401 }
@@ -1405,7 +1406,7 @@ send_callback (void *cls, size_t size, void *buf)
1405 GNUNET_CLIENT_receive (h->client, &msg_received, h, 1406 GNUNET_CLIENT_receive (h->client, &msg_received, h,
1406 GNUNET_TIME_UNIT_FOREVER_REL); 1407 GNUNET_TIME_UNIT_FOREVER_REL);
1407 } 1408 }
1408 LOG (GNUNET_ERROR_TYPE_DEBUG, "# Send packet() END\n"); 1409 LOG (GNUNET_ERROR_TYPE_DEBUG, "# Send callback() END\n");
1409 return tsize; 1410 return tsize;
1410} 1411}
1411 1412
@@ -1749,6 +1750,10 @@ GNUNET_CADET_notify_transmit_ready_cancel (struct GNUNET_CADET_TransmitHandle *t
1749{ 1750{
1750 struct GNUNET_CADET_Handle *cadet; 1751 struct GNUNET_CADET_Handle *cadet;
1751 1752
1753 LOG (GNUNET_ERROR_TYPE_DEBUG, "CADET NOTIFY TRANSMIT READY CANCEL\n");
1754 LOG (GNUNET_ERROR_TYPE_DEBUG, " on channel %X (%p)\n",
1755 th->channel->chid, th->channel);
1756 LOG (GNUNET_ERROR_TYPE_DEBUG, " size %u bytes\n", th->size);
1752 th->channel->packet_size = 0; 1757 th->channel->packet_size = 0;
1753 cadet = th->channel->cadet; 1758 cadet = th->channel->cadet;
1754 if (th->timeout_task != NULL) 1759 if (th->timeout_task != NULL)
@@ -1761,6 +1766,7 @@ GNUNET_CADET_notify_transmit_ready_cancel (struct GNUNET_CADET_TransmitHandle *t
1761 GNUNET_CLIENT_notify_transmit_ready_cancel (cadet->th); 1766 GNUNET_CLIENT_notify_transmit_ready_cancel (cadet->th);
1762 cadet->th = NULL; 1767 cadet->th = NULL;
1763 } 1768 }
1769 LOG (GNUNET_ERROR_TYPE_DEBUG, "CADET NOTIFY TRANSMIT READY CANCEL END\n");
1764} 1770}
1765 1771
1766 1772