aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-09 17:50:10 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-09 21:19:01 +0100
commitaae0e990d75448c3260ed74427a6a1e1658f8f0a (patch)
treed8dcbae16108367798c674d57309c697d14e4d67 /src/cadet/gnunet-service-cadet_channel.c
parente80db2f143f1ee65d8d62d52a3821d797b21bdde (diff)
downloadgnunet-aae0e990d75448c3260ed74427a6a1e1658f8f0a.tar.gz
gnunet-aae0e990d75448c3260ed74427a6a1e1658f8f0a.zip
cosmetics
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 11f23d38a..d2d176e83 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1969,21 +1969,23 @@ GCCH_handle_data (struct CadetChannel *ch,
1969 GC_m2s (GNUNET_MESSAGE_TYPE_CADET_DATA), GC_m2s (payload_type), mid, 1969 GC_m2s (GNUNET_MESSAGE_TYPE_CADET_DATA), GC_m2s (payload_type), mid,
1970 GCCH_2s (ch), ch, GC_f2s (fwd), ntohs (msg->header.size)); 1970 GCCH_2s (ch), ch, GC_f2s (fwd), ntohs (msg->header.size));
1971 1971
1972 if (GNUNET_NO == ch->reliable || 1972 if ( (GNUNET_NO == ch->reliable) ||
1973 ( !GC_is_pid_bigger (rel->mid_recv, mid) && 1973 ( (! GC_is_pid_bigger (rel->mid_recv, mid)) &&
1974 GC_is_pid_bigger (rel->mid_recv + 64, mid) ) ) 1974 GC_is_pid_bigger (rel->mid_recv + 64, mid) ) )
1975 { 1975 {
1976 if (GNUNET_YES == ch->reliable) 1976 if (GNUNET_YES == ch->reliable)
1977 { 1977 {
1978 /* Is this the exact next expected messasge? */ 1978 /* Is this the exact next expected messasge? */
1979 if (mid == rel->mid_recv) 1979 if (mid == rel->mid_recv)
1980 { 1980 {
1981 LOG (GNUNET_ERROR_TYPE_DEBUG, "as expected, sending to client\n"); 1981 LOG (GNUNET_ERROR_TYPE_DEBUG,
1982 "as expected, sending to client\n");
1982 send_client_data (ch, msg, fwd); 1983 send_client_data (ch, msg, fwd);
1983 } 1984 }
1984 else 1985 else
1985 { 1986 {
1986 LOG (GNUNET_ERROR_TYPE_DEBUG, "save for later\n"); 1987 LOG (GNUNET_ERROR_TYPE_DEBUG,
1988 "save for later\n");
1987 add_buffered_data (msg, rel); 1989 add_buffered_data (msg, rel);
1988 } 1990 }
1989 } 1991 }
@@ -2001,7 +2003,7 @@ GCCH_handle_data (struct CadetChannel *ch,
2001 if (GC_is_pid_bigger (rel->mid_recv, mid)) 2003 if (GC_is_pid_bigger (rel->mid_recv, mid))
2002 { 2004 {
2003 GNUNET_break_op (0); 2005 GNUNET_break_op (0);
2004 LOG (GNUNET_ERROR_TYPE_INFO, 2006 LOG (GNUNET_ERROR_TYPE_WARNING,
2005 "MID %u on channel %s not expected (window: %u - %u). Dropping!\n", 2007 "MID %u on channel %s not expected (window: %u - %u). Dropping!\n",
2006 mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63); 2008 mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63);
2007 } 2009 }