X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fbandwidth.c;h=6f25abfd523bc23870c59a14a1734adf7c9e6162;hb=bb83cd2d04ff5a3f7a8d05fc9a724b0246e958b6;hp=86181ec704aac4a009ee99d895ac9a9a44cbbc6d;hpb=71f77f1be3d6e2da1b88fe4a4fdd44c3c69b5325;p=oweals%2Fgnunet.git diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index 86181ec70..6f25abfd5 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c @@ -84,8 +84,8 @@ GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO b #if DEBUG_BANDWIDTH GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Bandwidth has %llu bytes available until deadline in %llums\n", - (unsigned long long) ((b * deadline.abs_value + 500LL) / 1000LL), - deadline.abs_value); + (unsigned long long) ((b * deadline.rel_value + 500LL) / 1000LL), + deadline.rel_value); #endif return (b * deadline.rel_value + 500LL) / 1000LL; } @@ -119,7 +119,7 @@ GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, #if DEBUG_BANDWIDTH GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Bandwidth suggests delay of %llu ms for %llu bytes of traffic\n", - (unsigned long long) ret.abs_value, + (unsigned long long) ret.rel_value, (unsigned long long) size); #endif return ret; @@ -185,7 +185,6 @@ update_tracker (struct GNUNET_BANDWIDTH_Tracker *av) max_carry = av->available_bytes_per_s__ * av->max_carry_s__; if (max_carry < GNUNET_SERVER_MAX_MESSAGE_SIZE) max_carry = GNUNET_SERVER_MAX_MESSAGE_SIZE; - av->consumption_since_last_update__ = -left_bytes; if (max_carry > left_bytes) av->consumption_since_last_update__ = -left_bytes; else @@ -297,7 +296,7 @@ GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, "Tracker %p delay for %u bytes is %llu ms\n", av, (unsigned int) size, - (unsigned long long) ret.abs_value); + (unsigned long long) ret.rel_value); #endif return ret; }