- fix coverity
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet_channel.c
index 1738dec1dead3697e74151f98d34a7da24f640fc..d4f9754da2315743d3dd0d75fa35502240eae61b 100644 (file)
@@ -721,11 +721,9 @@ send_client_nack (struct CadetChannel *ch)
  * We haven't received an ACK after a certain time: restransmit the message.
  *
  * @param cls Closure (CadetChannelReliability with the message to restransmit)
- * @param tc TaskContext.
  */
 static void
-channel_retransmit_message (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc)
+channel_retransmit_message (void *cls)
 {
   struct CadetChannelReliability *rel = cls;
   struct CadetReliableMessage *copy;
@@ -734,9 +732,6 @@ channel_retransmit_message (void *cls,
   int fwd;
 
   rel->retry_task = NULL;
-  if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
-    return;
-
   ch = rel->ch;
   copy = rel->head_sent;
   if (NULL == copy)
@@ -760,19 +755,16 @@ channel_retransmit_message (void *cls,
  * We haven't received an Channel ACK after a certain time: resend the CREATE.
  *
  * @param cls Closure (CadetChannelReliability of the channel to recreate)
- * @param tc TaskContext.
  */
 static void
-channel_recreate (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+channel_recreate (void *cls)
 {
   struct CadetChannelReliability *rel = cls;
 
   rel->retry_task = NULL;
-  if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
-    return;
-
   LOG (GNUNET_ERROR_TYPE_DEBUG, "RE-CREATE\n");
-  GNUNET_STATISTICS_update (stats, "# data retransmitted", 1, GNUNET_NO);
+  GNUNET_STATISTICS_update (stats,
+                           "# data retransmitted", 1, GNUNET_NO);
 
   if (rel == rel->ch->root_rel)
   {
@@ -786,7 +778,6 @@ channel_recreate (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
     GNUNET_break (0);
   }
-
 }
 
 
@@ -2011,8 +2002,8 @@ GCCH_handle_data (struct CadetChannel *ch,
     {
       GNUNET_break_op (0);
       LOG (GNUNET_ERROR_TYPE_INFO,
-          "MID %u on channel %s not expected (window: %u - %u). Dropping!\n",
-          mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63);
+           "MID %u on channel %s not expected (window: %u - %u). Dropping!\n",
+           mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63);
     }
     else
     {
@@ -2022,8 +2013,8 @@ GCCH_handle_data (struct CadetChannel *ch,
       if (NULL != rel->uniq)
       {
         LOG (GNUNET_ERROR_TYPE_WARNING,
-            "We are trying to send an ACK, but don't seem have the "
-            "bandwidth. Try to increase your [ats] QUOTA in you config file\n");
+             "We are trying to send an ACK, but don't seem have the "
+             "bandwidth. Have you set enough [ats] QUOTA in your config?\n");
       }
 
     }