aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-20 00:45:04 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-20 00:45:04 +0200
commit18a14f4dac9dbf517fbe8158b740147a06083cc4 (patch)
treedcceaf5165ea073d1495016674e4662392af5ba8 /src/cadet/gnunet-service-cadet_channel.c
parent0be37e812d034754eb725701f237fbc81b973904 (diff)
downloadgnunet-18a14f4dac9dbf517fbe8158b740147a06083cc4.tar.gz
gnunet-18a14f4dac9dbf517fbe8158b740147a06083cc4.zip
fix another off by one
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 1a2b32be0..7a7942dea 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -411,7 +411,7 @@ GCCH_2s (const struct CadetChannel *ch)
411 411
412 412
413/** 413/**
414 * Hash the @a port and @a initiator and @a listener to 414 * Hash the @a port and @a initiator and @a listener to
415 * calculate the "challenge" @a h_port we send to the other 415 * calculate the "challenge" @a h_port we send to the other
416 * peer on #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN. 416 * peer on #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN.
417 * 417 *
@@ -1186,7 +1186,7 @@ GCCH_handle_channel_open_ack (struct CadetChannel *ch,
1186 port, 1186 port,
1187 sizeof (struct GNUNET_HashCode))) 1187 sizeof (struct GNUNET_HashCode)))
1188 { 1188 {
1189 /* Other peer failed to provide the right port, 1189 /* Other peer failed to provide the right port,
1190 refuse connection. */ 1190 refuse connection. */
1191 GNUNET_break_op (0); 1191 GNUNET_break_op (0);
1192 return; 1192 return;
@@ -1822,7 +1822,7 @@ GCCH_handle_local_data (struct CadetChannel *ch,
1822{ 1822{
1823 struct CadetReliableMessage *crm; 1823 struct CadetReliableMessage *crm;
1824 1824
1825 if (ch->pending_messages > ch->max_pending_messages) 1825 if (ch->pending_messages >= ch->max_pending_messages)
1826 { 1826 {
1827 GNUNET_break (0); 1827 GNUNET_break (0);
1828 return GNUNET_SYSERR; 1828 return GNUNET_SYSERR;