fix
authorChristian Grothoff <christian@grothoff.org>
Thu, 8 Apr 2010 13:44:24 +0000 (13:44 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 8 Apr 2010 13:44:24 +0000 (13:44 +0000)
src/util/bandwidth.c

index a3a46a7cafc9181f62383039e3ab0c5a9aefebd3..71701a84cb0ff42cdcebca9f3156619c50577d2a 100644 (file)
@@ -266,7 +266,7 @@ GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
     }
   else
     {
-      av->last_update__.value -= (size * av->available_bytes_per_s__ + 500LL) / 1000LL;
+      av->last_update__.value -= ((-size) * av->available_bytes_per_s__ + 500LL) / 1000LL;
       update_tracker (av);
     }
   return GNUNET_NO;