-ensure stats queues do not grow too big
[oweals/gnunet.git] / src / fragmentation / fragmentation.c
index edc8c164606140e8cf4f1d737a019b5103295181..3a55502e71b03adfcde7e71778b48c1b8a8af73a 100644 (file)
@@ -167,11 +167,9 @@ GNUNET_FRAGMENT_print_ack (const struct GNUNET_MessageHeader *ack)
  * Transmit the next fragment to the other peer.
  *
  * @param cls the `struct GNUNET_FRAGMENT_Context`
- * @param tc scheduler context
  */
 static void
-transmit_next (void *cls,
-               const struct GNUNET_SCHEDULER_TaskContext *tc)
+transmit_next (void *cls)
 {
   struct GNUNET_FRAGMENT_Context *fc = cls;
   char msg[fc->mtu];
@@ -262,7 +260,7 @@ transmit_next (void *cls,
     delay = GNUNET_TIME_UNIT_ZERO;
   delay = GNUNET_TIME_relative_max (delay,
                                    GNUNET_TIME_relative_multiply (fc->msg_delay,
-                                                                  (1 << fc->num_rounds)));
+                                                                  (1ULL << fc->num_rounds)));
   if (wrap)
   {
     /* full round transmitted wait 2x delay for ACK before going again */
@@ -420,10 +418,10 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
     snd_cnt = 0;
     for (i=0;i<64;i++)
     {
-      if (1 == (fc->acks_mask & (1 << i)))
+      if (1 == (fc->acks_mask & (1ULL << i)))
       {
        snd_cnt++;
-       if (0 == (abits & (1 << i)))
+       if (0 == (abits & (1ULL << i)))
          ack_cnt++;
       }
     }