aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-07 15:26:06 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-07 15:26:06 +0000
commit013cf64f56c0a529f0c11597e912b39e4a0a896c (patch)
tree763624e31708ea0d0b7b8f11f5c1308e220c0b94 /src/dht
parent900c1831440d1b6f9fdb35d39334bca2e94bdefb (diff)
downloadgnunet-013cf64f56c0a529f0c11597e912b39e4a0a896c.tar.gz
gnunet-013cf64f56c0a529f0c11597e912b39e4a0a896c.zip
first round of simplification to change preference API
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 9d4885b78..0623c0cb1 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -452,20 +452,16 @@ update_core_preference (void *cls,
452 * 452 *
453 * @param cls closure 453 * @param cls closure
454 * @param peer identifies the peer 454 * @param peer identifies the peer
455 * @param bpm_out set to the current bandwidth limit (sending) for this peer
456 * @param amount set to the amount that was actually reserved or unreserved; 455 * @param amount set to the amount that was actually reserved or unreserved;
457 * either the full requested amount or zero (no partial reservations) 456 * either the full requested amount or zero (no partial reservations)
458 * @param res_delay if the reservation could not be satisfied (amount was 0), how 457 * @param res_delay if the reservation could not be satisfied (amount was 0), how
459 * long should the client wait until re-trying? 458 * long should the client wait until re-trying?
460 * @param preference current traffic preference for the given peer
461 */ 459 */
462static void 460static void
463update_core_preference_finish (void *cls, 461update_core_preference_finish (void *cls,
464 const struct GNUNET_PeerIdentity *peer, 462 const struct GNUNET_PeerIdentity *peer,
465 struct GNUNET_BANDWIDTH_Value32NBO bpm_out,
466 int32_t amount, 463 int32_t amount,
467 struct GNUNET_TIME_Relative res_delay, 464 struct GNUNET_TIME_Relative res_delay)
468 uint64_t preference)
469{ 465{
470 struct PeerInfo *peer_info = cls; 466 struct PeerInfo *peer_info = cls;
471 467
@@ -519,8 +515,7 @@ update_core_preference (void *cls,
519 GNUNET_NO); 515 GNUNET_NO);
520 peer->info_ctx = 516 peer->info_ctx =
521 GNUNET_CORE_peer_change_preference (coreAPI, &peer->id, 517 GNUNET_CORE_peer_change_preference (coreAPI, &peer->id,
522 GNUNET_TIME_UNIT_FOREVER_REL, 518 0,
523 GNUNET_BANDWIDTH_VALUE_MAX, 0,
524 preference, 519 preference,
525 &update_core_preference_finish, peer); 520 &update_core_preference_finish, peer);
526} 521}