diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-12-15 07:18:24 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-12-15 07:18:24 +0000 |
commit | c6a48607eb7fbb58537c2b93894a31d3d7c06554 (patch) | |
tree | 159ede80c49d92c52a1ce20a5e9e5b315342dc86 /src/cadet/gnunet-service-cadet_channel.c | |
parent | 821bf0aafe27fe327b9a07dcca8b12b5779f7486 (diff) | |
download | gnunet-c6a48607eb7fbb58537c2b93894a31d3d7c06554.tar.gz gnunet-c6a48607eb7fbb58537c2b93894a31d3d7c06554.zip |
Fix channel buffer retrieval, add debug
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 7f92e8b5e..c77cc5fc4 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -1424,13 +1424,17 @@ GCCH_get_buffer (struct CadetChannel *ch, int fwd) | |||
1424 | struct CadetChannelReliability *rel; | 1424 | struct CadetChannelReliability *rel; |
1425 | 1425 | ||
1426 | rel = fwd ? ch->dest_rel : ch->root_rel; | 1426 | rel = fwd ? ch->dest_rel : ch->root_rel; |
1427 | 1427 | LOG (GNUNET_ERROR_TYPE_DEBUG, " get buffer, channel %s\n", GCCH_2s (ch)); | |
1428 | GCCH_debug (ch); | ||
1428 | /* If rel is NULL it means that the end is not yet created, | 1429 | /* If rel is NULL it means that the end is not yet created, |
1429 | * most probably is a loopback channel at the point of sending | 1430 | * most probably is a loopback channel at the point of sending |
1430 | * the ChannelCreate to itself. | 1431 | * the ChannelCreate to itself. |
1431 | */ | 1432 | */ |
1432 | if (NULL == rel) | 1433 | if (NULL == rel) |
1434 | { | ||
1435 | LOG (GNUNET_ERROR_TYPE_DEBUG, " rel is NULL: max\n"); | ||
1433 | return 64; | 1436 | return 64; |
1437 | } | ||
1434 | 1438 | ||
1435 | return (64 - rel->n_recv); | 1439 | return (64 - rel->n_recv); |
1436 | } | 1440 | } |