fix another off by one
authorChristian Grothoff <christian@grothoff.org>
Sat, 19 May 2018 22:45:04 +0000 (00:45 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sat, 19 May 2018 22:45:04 +0000 (00:45 +0200)
src/cadet/gnunet-service-cadet_channel.c

index 1a2b32be0031a85b5ccda30e5c46a1f88a62d744..7a7942dea875071548424a932989067d62f4f952 100644 (file)
@@ -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;