From: Christian Grothoff Date: Sat, 19 May 2018 22:45:04 +0000 (+0200) Subject: fix another off by one X-Git-Tag: v0.11.0pre66~36^2~49 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18a14f4dac9dbf517fbe8158b740147a06083cc4;p=oweals%2Fgnunet.git fix another off by one --- 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) /** - * Hash the @a port and @a initiator and @a listener to + * Hash the @a port and @a initiator and @a listener to * calculate the "challenge" @a h_port we send to the other * peer on #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN. * @@ -1186,7 +1186,7 @@ GCCH_handle_channel_open_ack (struct CadetChannel *ch, port, sizeof (struct GNUNET_HashCode))) { - /* Other peer failed to provide the right port, + /* Other peer failed to provide the right port, refuse connection. */ GNUNET_break_op (0); return; @@ -1822,7 +1822,7 @@ GCCH_handle_local_data (struct CadetChannel *ch, { struct CadetReliableMessage *crm; - if (ch->pending_messages > ch->max_pending_messages) + if (ch->pending_messages >= ch->max_pending_messages) { GNUNET_break (0); return GNUNET_SYSERR;