diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:13:55 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:13:55 +0100 |
commit | 17d34d5e094c2f8a90717b07e3a711d6e2c15903 (patch) | |
tree | 777b5323145a5f4d1f044da29a682799008a11d4 /src/util/bandwidth.c | |
parent | 3391977e3f92a2ebcafc14ea6374aecd580df873 (diff) | |
download | gnunet-17d34d5e094c2f8a90717b07e3a711d6e2c15903.tar.gz gnunet-17d34d5e094c2f8a90717b07e3a711d6e2c15903.zip |
more renamings relating to 'new' service now just being the 'normal' service
Diffstat (limited to 'src/util/bandwidth.c')
-rw-r--r-- | src/util/bandwidth.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index a059fc738..bc0c3b9b4 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c | |||
@@ -184,8 +184,8 @@ update_excess (struct GNUNET_BANDWIDTH_Tracker *av) | |||
184 | } | 184 | } |
185 | /* negative current_consumption means that we have savings */ | 185 | /* negative current_consumption means that we have savings */ |
186 | max_carry = ((uint64_t) av->available_bytes_per_s__) * av->max_carry_s__; | 186 | max_carry = ((uint64_t) av->available_bytes_per_s__) * av->max_carry_s__; |
187 | if (max_carry < GNUNET_SERVER_MAX_MESSAGE_SIZE) | 187 | if (max_carry < GNUNET_MAX_MESSAGE_SIZE) |
188 | max_carry = GNUNET_SERVER_MAX_MESSAGE_SIZE; | 188 | max_carry = GNUNET_MAX_MESSAGE_SIZE; |
189 | if (max_carry > INT64_MAX) | 189 | if (max_carry > INT64_MAX) |
190 | max_carry = INT64_MAX; | 190 | max_carry = INT64_MAX; |
191 | left_bytes = current_consumption + max_carry; | 191 | left_bytes = current_consumption + max_carry; |
@@ -224,10 +224,10 @@ update_excess (struct GNUNET_BANDWIDTH_Tracker *av) | |||
224 | /** | 224 | /** |
225 | * Initialize bandwidth tracker. Note that in addition to the | 225 | * Initialize bandwidth tracker. Note that in addition to the |
226 | * 'max_carry_s' limit, we also always allow at least | 226 | * 'max_carry_s' limit, we also always allow at least |
227 | * #GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate. So if the | 227 | * #GNUNET_MAX_MESSAGE_SIZE to accumulate. So if the |
228 | * bytes-per-second limit is so small that within 'max_carry_s' not | 228 | * bytes-per-second limit is so small that within 'max_carry_s' not |
229 | * even #GNUNET_SERVER_MAX_MESSAGE_SIZE is allowed to accumulate, it is | 229 | * even #GNUNET_MAX_MESSAGE_SIZE is allowed to accumulate, it is |
230 | * ignored and replaced by #GNUNET_SERVER_MAX_MESSAGE_SIZE (which is in | 230 | * ignored and replaced by #GNUNET_MAX_MESSAGE_SIZE (which is in |
231 | * bytes). | 231 | * bytes). |
232 | * | 232 | * |
233 | * To stop notifications about updates and excess callbacks use | 233 | * To stop notifications about updates and excess callbacks use |
@@ -271,10 +271,10 @@ GNUNET_BANDWIDTH_tracker_init2 (struct GNUNET_BANDWIDTH_Tracker *av, | |||
271 | /** | 271 | /** |
272 | * Initialize bandwidth tracker. Note that in addition to the | 272 | * Initialize bandwidth tracker. Note that in addition to the |
273 | * 'max_carry_s' limit, we also always allow at least | 273 | * 'max_carry_s' limit, we also always allow at least |
274 | * #GNUNET_SERVER_MAX_MESSAGE_SIZE to accumulate. So if the | 274 | * #GNUNET_MAX_MESSAGE_SIZE to accumulate. So if the |
275 | * bytes-per-second limit is so small that within 'max_carry_s' not | 275 | * bytes-per-second limit is so small that within 'max_carry_s' not |
276 | * even #GNUNET_SERVER_MAX_MESSAGE_SIZE is allowed to accumulate, it is | 276 | * even #GNUNET_MAX_MESSAGE_SIZE is allowed to accumulate, it is |
277 | * ignored and replaced by #GNUNET_SERVER_MAX_MESSAGE_SIZE (which is in | 277 | * ignored and replaced by #GNUNET_MAX_MESSAGE_SIZE (which is in |
278 | * bytes). | 278 | * bytes). |
279 | * | 279 | * |
280 | * @param av tracker to initialize | 280 | * @param av tracker to initialize |
@@ -345,8 +345,8 @@ update_tracker (struct GNUNET_BANDWIDTH_Tracker *av) | |||
345 | left_bytes = - av->consumption_since_last_update__; | 345 | left_bytes = - av->consumption_since_last_update__; |
346 | max_carry = ((unsigned long long) av->available_bytes_per_s__) * | 346 | max_carry = ((unsigned long long) av->available_bytes_per_s__) * |
347 | av->max_carry_s__; | 347 | av->max_carry_s__; |
348 | if (max_carry < GNUNET_SERVER_MAX_MESSAGE_SIZE) | 348 | if (max_carry < GNUNET_MAX_MESSAGE_SIZE) |
349 | max_carry = GNUNET_SERVER_MAX_MESSAGE_SIZE; | 349 | max_carry = GNUNET_MAX_MESSAGE_SIZE; |
350 | if (max_carry > INT64_MAX) | 350 | if (max_carry > INT64_MAX) |
351 | max_carry = INT64_MAX; | 351 | max_carry = INT64_MAX; |
352 | if (max_carry > left_bytes) | 352 | if (max_carry > left_bytes) |