[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34613 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34613 - gnunet/src/cadet |
Date: |
Mon, 15 Dec 2014 08:18:24 +0100 |
Author: bartpolot
Date: 2014-12-15 08:18:24 +0100 (Mon, 15 Dec 2014)
New Revision: 34613
Modified:
gnunet/src/cadet/gnunet-service-cadet_channel.c
gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
Fix channel buffer retrieval, add debug
Modified: gnunet/src/cadet/gnunet-service-cadet_channel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_channel.c 2014-12-15 07:18:22 UTC
(rev 34612)
+++ gnunet/src/cadet/gnunet-service-cadet_channel.c 2014-12-15 07:18:24 UTC
(rev 34613)
@@ -1424,13 +1424,17 @@
struct CadetChannelReliability *rel;
rel = fwd ? ch->dest_rel : ch->root_rel;
-
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " get buffer, channel %s\n", GCCH_2s (ch));
+ GCCH_debug (ch);
/* If rel is NULL it means that the end is not yet created,
* most probably is a loopback channel at the point of sending
* the ChannelCreate to itself.
*/
if (NULL == rel)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " rel is NULL: max\n");
return 64;
+ }
return (64 - rel->n_recv);
}
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:18:22 UTC
(rev 34612)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:18:24 UTC
(rev 34613)
@@ -476,8 +476,8 @@
{
int fwd;
- /* If channel is outgoing, is origin in the FWD direction and fwd is YES */
- fwd = GCCH_is_origin (tch->ch, GNUNET_YES);
+ /* If channel is incoming, is terminal in the FWD direction and fwd is YES */
+ fwd = GCCH_is_terminal (tch->ch, GNUNET_YES);
return GCCH_get_buffer (tch->ch, fwd);
}
@@ -2823,6 +2823,7 @@
if (NULL == t->channel_head)
{
/* Probably getting buffer for a channel create/handshake. */
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " no channels, allow max\n");
return 64;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34613 - gnunet/src/cadet,
gnunet <=