diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-03-27 10:32:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-03-27 10:32:30 +0000 |
commit | 817bbb71e3e583ec85d6d63ca3e0cbb90ccd7462 (patch) | |
tree | 7e9e8717e9f57b74fca3a0e93f0d4b94234a1dd3 /src/fs/gnunet-service-fs_cp.c | |
parent | 3814b7980a4ed1117be9659a3d10fa49cb4c16e9 (diff) | |
download | gnunet-817bbb71e3e583ec85d6d63ca3e0cbb90ccd7462.tar.gz gnunet-817bbb71e3e583ec85d6d63ca3e0cbb90ccd7462.zip |
communicate res delay in capi
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 783bd4024..05638b657 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -330,13 +330,16 @@ peer_transmit_ready_cb (void *cls, | |||
330 | * @param bandwidth_out available amount of outbound bandwidth | 330 | * @param bandwidth_out available amount of outbound bandwidth |
331 | * @param amount set to the amount that was actually reserved or unreserved; | 331 | * @param amount set to the amount that was actually reserved or unreserved; |
332 | * either the full requested amount or zero (no partial reservations) | 332 | * either the full requested amount or zero (no partial reservations) |
333 | * @param res_delay if the reservation could not be satisfied (amount was 0), how | ||
334 | * long should the client wait until re-trying? | ||
333 | * @param preference current traffic preference for the given peer | 335 | * @param preference current traffic preference for the given peer |
334 | */ | 336 | */ |
335 | static void | 337 | static void |
336 | core_reserve_callback (void *cls, | 338 | core_reserve_callback (void *cls, |
337 | const struct GNUNET_PeerIdentity *peer, | 339 | const struct GNUNET_PeerIdentity *peer, |
338 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 340 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
339 | int amount, | 341 | int32_t amount, |
342 | struct GNUNET_TIME_Relative res_delay, | ||
340 | uint64_t preference) | 343 | uint64_t preference) |
341 | { | 344 | { |
342 | struct GSF_ConnectedPeer *cp = cls; | 345 | struct GSF_ConnectedPeer *cp = cls; |
@@ -347,6 +350,7 @@ core_reserve_callback (void *cls, | |||
347 | if (0 == amount) | 350 | if (0 == amount) |
348 | { | 351 | { |
349 | /* failed; retry! (how did we get here!?) */ | 352 | /* failed; retry! (how did we get here!?) */ |
353 | /* FIXME: wait res_delay before re-trying! */ | ||
350 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 354 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
351 | _("Failed to reserve bandwidth to peer `%s'\n"), | 355 | _("Failed to reserve bandwidth to peer `%s'\n"), |
352 | GNUNET_i2s (peer)); | 356 | GNUNET_i2s (peer)); |