diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-10 12:08:12 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-10 12:08:12 +0000 |
commit | 4359e951e0fc1aa34105c25c7391491a36a01731 (patch) | |
tree | 763054af952b2b2515b504d337fbdf2b7119f34d /src/cadet/gnunet-service-cadet_channel.c | |
parent | fbca6292c4da4674dd2300d45baf0bf3029e6c7b (diff) | |
download | gnunet-4359e951e0fc1aa34105c25c7391491a36a01731.tar.gz gnunet-4359e951e0fc1aa34105c25c7391491a36a01731.zip |
- add n_recv to debug info
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 70b21c0ba..7a257941d 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -425,7 +425,7 @@ add_buffered_data (const struct GNUNET_CADET_Data *msg, | |||
425 | } | 425 | } |
426 | } | 426 | } |
427 | copy = copy_message (msg, mid, rel); | 427 | copy = copy_message (msg, mid, rel); |
428 | LOG (GNUNET_ERROR_TYPE_DEBUG, " insert at tail!\n"); | 428 | LOG (GNUNET_ERROR_TYPE_DEBUG, " insert at tail! (now: %u)\n", rel->n_recv); |
429 | GNUNET_CONTAINER_DLL_insert_tail (rel->head_recv, rel->tail_recv, copy); | 429 | GNUNET_CONTAINER_DLL_insert_tail (rel->head_recv, rel->tail_recv, copy); |
430 | LOG (GNUNET_ERROR_TYPE_DEBUG, "add_buffered_data END\n"); | 430 | LOG (GNUNET_ERROR_TYPE_DEBUG, "add_buffered_data END\n"); |
431 | } | 431 | } |
@@ -1439,6 +1439,7 @@ GCCH_get_buffer (struct CadetChannel *ch, int fwd) | |||
1439 | return 64; | 1439 | return 64; |
1440 | } | 1440 | } |
1441 | 1441 | ||
1442 | LOG (GNUNET_ERROR_TYPE_DEBUG, " n_recv %d\n", rel->n_recv); | ||
1442 | return (64 - rel->n_recv); | 1443 | return (64 - rel->n_recv); |
1443 | } | 1444 | } |
1444 | 1445 | ||
@@ -1652,6 +1653,9 @@ GCCH_debug (struct CadetChannel *ch) | |||
1652 | LOG (GNUNET_ERROR_TYPE_DEBUG, " ready %s\n", | 1653 | LOG (GNUNET_ERROR_TYPE_DEBUG, " ready %s\n", |
1653 | ch->root_rel->client_ready ? "YES" : "NO"); | 1654 | ch->root_rel->client_ready ? "YES" : "NO"); |
1654 | LOG (GNUNET_ERROR_TYPE_DEBUG, " id %X\n", ch->lid_root); | 1655 | LOG (GNUNET_ERROR_TYPE_DEBUG, " id %X\n", ch->lid_root); |
1656 | LOG (GNUNET_ERROR_TYPE_DEBUG, " recv %d\n", ch->root_rel->n_recv); | ||
1657 | LOG (GNUNET_ERROR_TYPE_DEBUG, " MID r: %d, s: %d\n", | ||
1658 | ch->root_rel->mid_recv, ch->root_rel->mid_send); | ||
1655 | } | 1659 | } |
1656 | LOG (GNUNET_ERROR_TYPE_DEBUG, " dest %p/%p\n", | 1660 | LOG (GNUNET_ERROR_TYPE_DEBUG, " dest %p/%p\n", |
1657 | ch->dest, ch->dest_rel); | 1661 | ch->dest, ch->dest_rel); |
@@ -1661,6 +1665,10 @@ GCCH_debug (struct CadetChannel *ch) | |||
1661 | LOG (GNUNET_ERROR_TYPE_DEBUG, " ready %s\n", | 1665 | LOG (GNUNET_ERROR_TYPE_DEBUG, " ready %s\n", |
1662 | ch->dest_rel->client_ready ? "YES" : "NO"); | 1666 | ch->dest_rel->client_ready ? "YES" : "NO"); |
1663 | LOG (GNUNET_ERROR_TYPE_DEBUG, " id %X\n", ch->lid_dest); | 1667 | LOG (GNUNET_ERROR_TYPE_DEBUG, " id %X\n", ch->lid_dest); |
1668 | LOG (GNUNET_ERROR_TYPE_DEBUG, " recv %d\n", ch->dest_rel->n_recv); | ||
1669 | LOG (GNUNET_ERROR_TYPE_DEBUG, " MID r: %d, s: %d\n", | ||
1670 | ch->dest_rel->mid_recv, ch->dest_rel->mid_send); | ||
1671 | |||
1664 | } | 1672 | } |
1665 | } | 1673 | } |
1666 | 1674 | ||
@@ -2367,7 +2375,7 @@ GCCH_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
2367 | LOG (GNUNET_ERROR_TYPE_DEBUG, " new chq: %p\n", chq); | 2375 | LOG (GNUNET_ERROR_TYPE_DEBUG, " new chq: %p\n", chq); |
2368 | chq->copy->chq = chq; | 2376 | chq->copy->chq = chq; |
2369 | chq->tq = GCT_send_prebuilt_message (message, ch->t, NULL, | 2377 | chq->tq = GCT_send_prebuilt_message (message, ch->t, NULL, |
2370 | GNUNET_NO, | 2378 | NULL != existing_copy, |
2371 | &ch_message_sent, chq); | 2379 | &ch_message_sent, chq); |
2372 | /* q itself is stored in copy */ | 2380 | /* q itself is stored in copy */ |
2373 | GNUNET_assert (NULL != chq->tq || GNUNET_NO != ch->destroy); | 2381 | GNUNET_assert (NULL != chq->tq || GNUNET_NO != ch->destroy); |