diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-21 14:43:47 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-03-21 14:43:47 +0000 |
commit | 75c121f5ae37d3c7ccd95f4449aea33ccb4200f0 (patch) | |
tree | 3fb440657f99a826cc4f963db55e28cb426ed9d8 /src/fs/gnunet-service-fs.c | |
parent | eb2371484330014aaef9b0bfac1f1ae191bc2460 (diff) | |
download | gnunet-75c121f5ae37d3c7ccd95f4449aea33ccb4200f0.tar.gz gnunet-75c121f5ae37d3c7ccd95f4449aea33ccb4200f0.zip |
change to core pai
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 4364265a8..a4e18480e 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -267,9 +267,7 @@ update_latencies (const struct GNUNET_ATS_Information *atsi, | |||
267 | */ | 267 | */ |
268 | static int | 268 | static int |
269 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, | 269 | handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, |
270 | const struct GNUNET_MessageHeader *message, | 270 | const struct GNUNET_MessageHeader *message) |
271 | const struct GNUNET_ATS_Information *atsi, | ||
272 | unsigned int atsi_count) | ||
273 | { | 271 | { |
274 | struct GSF_ConnectedPeer *cp; | 272 | struct GSF_ConnectedPeer *cp; |
275 | 273 | ||
@@ -280,7 +278,8 @@ handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, | |||
280 | return GNUNET_OK; | 278 | return GNUNET_OK; |
281 | } | 279 | } |
282 | GSF_cover_content_count++; | 280 | GSF_cover_content_count++; |
283 | update_latencies (atsi, atsi_count); | 281 | fprintf (stderr, "FIX ATS DATA!\n"); |
282 | update_latencies (NULL, 0); | ||
284 | return GSF_handle_p2p_content_ (cp, message); | 283 | return GSF_handle_p2p_content_ (cp, message); |
285 | } | 284 | } |
286 | 285 | ||
@@ -349,9 +348,7 @@ consider_forwarding (void *cls, struct GSF_PendingRequest *pr, | |||
349 | */ | 348 | */ |
350 | static int | 349 | static int |
351 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, | 350 | handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, |
352 | const struct GNUNET_MessageHeader *message, | 351 | const struct GNUNET_MessageHeader *message) |
353 | const struct GNUNET_ATS_Information *atsi, | ||
354 | unsigned int atsi_count) | ||
355 | { | 352 | { |
356 | struct GSF_PendingRequest *pr; | 353 | struct GSF_PendingRequest *pr; |
357 | 354 | ||
@@ -360,7 +357,8 @@ handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, | |||
360 | return GNUNET_SYSERR; | 357 | return GNUNET_SYSERR; |
361 | GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES; | 358 | GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES; |
362 | GSF_local_lookup_ (pr, &consider_forwarding, NULL); | 359 | GSF_local_lookup_ (pr, &consider_forwarding, NULL); |
363 | update_latencies (atsi, atsi_count); | 360 | fprintf (stderr, "FIX ATS DATA!\n"); |
361 | update_latencies (NULL, 0); | ||
364 | return GNUNET_OK; | 362 | return GNUNET_OK; |
365 | } | 363 | } |
366 | 364 | ||
@@ -536,15 +534,14 @@ consider_peer_for_forwarding (void *cls, const struct GNUNET_HashCode * key, | |||
536 | * @param atsi_count number of records in 'atsi' | 534 | * @param atsi_count number of records in 'atsi' |
537 | */ | 535 | */ |
538 | static void | 536 | static void |
539 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | 537 | peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer) |
540 | const struct GNUNET_ATS_Information *atsi, | ||
541 | unsigned int atsi_count) | ||
542 | { | 538 | { |
543 | struct GSF_ConnectedPeer *cp; | 539 | struct GSF_ConnectedPeer *cp; |
544 | 540 | ||
545 | if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity))) | 541 | if (0 == memcmp (&my_id, peer, sizeof (struct GNUNET_PeerIdentity))) |
546 | return; | 542 | return; |
547 | cp = GSF_peer_connect_handler_ (peer, atsi, atsi_count); | 543 | fprintf (stderr, "FIX ATS DATA!\n"); |
544 | cp = GSF_peer_connect_handler_ (peer, NULL, 0); | ||
548 | if (NULL == cp) | 545 | if (NULL == cp) |
549 | return; | 546 | return; |
550 | GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp); | 547 | GSF_iterate_pending_requests_ (&consider_peer_for_forwarding, cp); |