diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-21 14:58:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-21 14:58:56 +0000 |
commit | 725a6d5cdbcc11b21e992edb20344f1695e076cc (patch) | |
tree | 651d495437222962dbd014c775991fd3a30c1d3c /src/fs | |
parent | d973b1bf149653e42441cd94ae177d82a4eb311c (diff) | |
download | gnunet-725a6d5cdbcc11b21e992edb20344f1695e076cc.tar.gz gnunet-725a6d5cdbcc11b21e992edb20344f1695e076cc.zip |
fix compile errors
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 4ce618bf7..541f656c6 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -417,7 +417,7 @@ struct PendingRequest | |||
417 | struct GNUNET_CONTAINER_BloomFilter *bf; | 417 | struct GNUNET_CONTAINER_BloomFilter *bf; |
418 | 418 | ||
419 | /** | 419 | /** |
420 | * Context of our GNUNET_CORE_peer_get_info call. | 420 | * Context of our GNUNET_CORE_peer_change_preference call. |
421 | */ | 421 | */ |
422 | struct GNUNET_CORE_InformationRequestContext *irc; | 422 | struct GNUNET_CORE_InformationRequestContext *irc; |
423 | 423 | ||
@@ -1770,8 +1770,6 @@ transmit_request_cb (void *cls, | |||
1770 | * | 1770 | * |
1771 | * @param cls the requests "struct PendingRequest*" | 1771 | * @param cls the requests "struct PendingRequest*" |
1772 | * @param peer identifies the peer | 1772 | * @param peer identifies the peer |
1773 | * @param latency current latency estimate, "FOREVER" if we have been | ||
1774 | * disconnected | ||
1775 | * @param bpm_in set to the current bandwidth limit (receiving) for this peer | 1773 | * @param bpm_in set to the current bandwidth limit (receiving) for this peer |
1776 | * @param bpm_out set to the current bandwidth limit (sending) for this peer | 1774 | * @param bpm_out set to the current bandwidth limit (sending) for this peer |
1777 | * @param amount set to the amount that was actually reserved or unreserved | 1775 | * @param amount set to the amount that was actually reserved or unreserved |
@@ -1783,9 +1781,8 @@ target_reservation_cb (void *cls, | |||
1783 | GNUNET_PeerIdentity * peer, | 1781 | GNUNET_PeerIdentity * peer, |
1784 | unsigned int bpm_in, | 1782 | unsigned int bpm_in, |
1785 | unsigned int bpm_out, | 1783 | unsigned int bpm_out, |
1786 | struct GNUNET_TIME_Relative | 1784 | int amount, |
1787 | latency, int amount, | 1785 | uint64_t preference) |
1788 | unsigned long long preference) | ||
1789 | { | 1786 | { |
1790 | struct PendingRequest *pr = cls; | 1787 | struct PendingRequest *pr = cls; |
1791 | uint32_t priority; | 1788 | uint32_t priority; |
@@ -1872,7 +1869,7 @@ forward_request_task (void *cls, | |||
1872 | } | 1869 | } |
1873 | /* (2) reserve reply bandwidth */ | 1870 | /* (2) reserve reply bandwidth */ |
1874 | GNUNET_assert (NULL == pr->irc); | 1871 | GNUNET_assert (NULL == pr->irc); |
1875 | pr->irc = GNUNET_CORE_peer_get_info (sched, cfg, | 1872 | pr->irc = GNUNET_CORE_peer_change_preference (sched, cfg, |
1876 | &psc.target, | 1873 | &psc.target, |
1877 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, | 1874 | GNUNET_CONSTANTS_SERVICE_TIMEOUT, |
1878 | -1, | 1875 | -1, |
@@ -2222,7 +2219,7 @@ destroy_pending_request (struct PendingRequest *pr) | |||
2222 | // also, what does the return value mean? | 2219 | // also, what does the return value mean? |
2223 | if (pr->irc != NULL) | 2220 | if (pr->irc != NULL) |
2224 | { | 2221 | { |
2225 | GNUNET_CORE_peer_get_info_cancel (pr->irc); | 2222 | GNUNET_CORE_peer_change_preference_cancel (pr->irc); |
2226 | pr->irc = NULL; | 2223 | pr->irc = NULL; |
2227 | } | 2224 | } |
2228 | if (pr->client == NULL) | 2225 | if (pr->client == NULL) |
@@ -2407,11 +2404,15 @@ destroy_request (void *cls, | |||
2407 | * | 2404 | * |
2408 | * @param cls closure, not used | 2405 | * @param cls closure, not used |
2409 | * @param peer peer identity this notification is about | 2406 | * @param peer peer identity this notification is about |
2407 | * @param latency reported latency of the connection with 'other' | ||
2408 | * @param distance reported distance (DV) to 'other' | ||
2410 | */ | 2409 | */ |
2411 | static void | 2410 | static void |
2412 | peer_connect_handler (void *cls, | 2411 | peer_connect_handler (void *cls, |
2413 | const struct | 2412 | const struct |
2414 | GNUNET_PeerIdentity * peer) | 2413 | GNUNET_PeerIdentity * peer, |
2414 | struct GNUNET_TIME_Relative latency, | ||
2415 | uint32_t distance) | ||
2415 | { | 2416 | { |
2416 | struct ConnectedPeer *cp; | 2417 | struct ConnectedPeer *cp; |
2417 | 2418 | ||
@@ -2773,13 +2774,17 @@ bound_priority (uint32_t prio_in, | |||
2773 | * @param other the other peer involved (sender or receiver, NULL | 2774 | * @param other the other peer involved (sender or receiver, NULL |
2774 | * for loopback messages where we are both sender and receiver) | 2775 | * for loopback messages where we are both sender and receiver) |
2775 | * @param message the actual message | 2776 | * @param message the actual message |
2777 | * @param latency reported latency of the connection with 'other' | ||
2778 | * @param distance reported distance (DV) to 'other' | ||
2776 | * @return GNUNET_OK to keep the connection open, | 2779 | * @return GNUNET_OK to keep the connection open, |
2777 | * GNUNET_SYSERR to close it (signal serious error) | 2780 | * GNUNET_SYSERR to close it (signal serious error) |
2778 | */ | 2781 | */ |
2779 | static int | 2782 | static int |
2780 | handle_p2p_get (void *cls, | 2783 | handle_p2p_get (void *cls, |
2781 | const struct GNUNET_PeerIdentity *other, | 2784 | const struct GNUNET_PeerIdentity *other, |
2782 | const struct GNUNET_MessageHeader *message) | 2785 | const struct GNUNET_MessageHeader *message, |
2786 | struct GNUNET_TIME_Relative latency, | ||
2787 | uint32_t distance) | ||
2783 | { | 2788 | { |
2784 | uint16_t msize; | 2789 | uint16_t msize; |
2785 | const struct GetMessage *gm; | 2790 | const struct GetMessage *gm; |
@@ -2923,10 +2928,10 @@ handle_p2p_get (void *cls, | |||
2923 | if (preference < QUERY_BANDWIDTH_VALUE) | 2928 | if (preference < QUERY_BANDWIDTH_VALUE) |
2924 | preference = QUERY_BANDWIDTH_VALUE; | 2929 | preference = QUERY_BANDWIDTH_VALUE; |
2925 | // FIXME: also reserve bandwidth for reply? | 2930 | // FIXME: also reserve bandwidth for reply? |
2926 | (void) GNUNET_CORE_peer_get_info (sched, cfg, | 2931 | (void) GNUNET_CORE_peer_change_preference (sched, cfg, |
2927 | other, | 2932 | other, |
2928 | GNUNET_TIME_UNIT_FOREVER_REL, | 2933 | GNUNET_TIME_UNIT_FOREVER_REL, |
2929 | 0, 0, preference, NULL, NULL); | 2934 | 0, 0, preference, NULL, NULL); |
2930 | if (0 != (pgc->policy & ROUTING_POLICY_ANSWER)) | 2935 | if (0 != (pgc->policy & ROUTING_POLICY_ANSWER)) |
2931 | pgc->drq = queue_ds_request (BASIC_DATASTORE_REQUEST_DELAY, | 2936 | pgc->drq = queue_ds_request (BASIC_DATASTORE_REQUEST_DELAY, |
2932 | &ds_get_request, | 2937 | &ds_get_request, |
@@ -3205,13 +3210,17 @@ check_sblock (const struct SBlock *sb, | |||
3205 | * @param other the other peer involved (sender or receiver, NULL | 3210 | * @param other the other peer involved (sender or receiver, NULL |
3206 | * for loopback messages where we are both sender and receiver) | 3211 | * for loopback messages where we are both sender and receiver) |
3207 | * @param message the actual message | 3212 | * @param message the actual message |
3213 | * @param latency reported latency of the connection with 'other' | ||
3214 | * @param distance reported distance (DV) to 'other' | ||
3208 | * @return GNUNET_OK to keep the connection open, | 3215 | * @return GNUNET_OK to keep the connection open, |
3209 | * GNUNET_SYSERR to close it (signal serious error) | 3216 | * GNUNET_SYSERR to close it (signal serious error) |
3210 | */ | 3217 | */ |
3211 | static int | 3218 | static int |
3212 | handle_p2p_put (void *cls, | 3219 | handle_p2p_put (void *cls, |
3213 | const struct GNUNET_PeerIdentity *other, | 3220 | const struct GNUNET_PeerIdentity *other, |
3214 | const struct GNUNET_MessageHeader *message) | 3221 | const struct GNUNET_MessageHeader *message, |
3222 | struct GNUNET_TIME_Relative latency, | ||
3223 | uint32_t distance) | ||
3215 | { | 3224 | { |
3216 | const struct PutMessage *put; | 3225 | const struct PutMessage *put; |
3217 | uint16_t msize; | 3226 | uint16_t msize; |