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 | |
parent | eb2371484330014aaef9b0bfac1f1ae191bc2460 (diff) | |
download | gnunet-75c121f5ae37d3c7ccd95f4449aea33ccb4200f0.tar.gz gnunet-75c121f5ae37d3c7ccd95f4449aea33ccb4200f0.zip |
change to core pai
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 21 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 7 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cp.h | 4 |
3 files changed, 13 insertions, 19 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); |
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index f38a32c81..6e1f8728a 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -692,9 +692,7 @@ GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer) | |||
692 | int | 692 | int |
693 | GSF_handle_p2p_migration_stop_ (void *cls, | 693 | GSF_handle_p2p_migration_stop_ (void *cls, |
694 | const struct GNUNET_PeerIdentity *other, | 694 | const struct GNUNET_PeerIdentity *other, |
695 | const struct GNUNET_MessageHeader *message, | 695 | const struct GNUNET_MessageHeader *message) |
696 | const struct GNUNET_ATS_Information *atsi, | ||
697 | unsigned int atsi_count) | ||
698 | { | 696 | { |
699 | struct GSF_ConnectedPeer *cp; | 697 | struct GSF_ConnectedPeer *cp; |
700 | const struct MigrationStopMessage *msm; | 698 | const struct MigrationStopMessage *msm; |
@@ -722,7 +720,8 @@ GSF_handle_p2p_migration_stop_ (void *cls, | |||
722 | cp->mig_revive_task = | 720 | cp->mig_revive_task = |
723 | GNUNET_SCHEDULER_add_delayed (bt, &revive_migration, cp); | 721 | GNUNET_SCHEDULER_add_delayed (bt, &revive_migration, cp); |
724 | } | 722 | } |
725 | update_atsi (cp, atsi, atsi_count); | 723 | fprintf (stderr, "FIX ATS DATA!\n"); |
724 | update_atsi (cp, NULL, 0); | ||
726 | return GNUNET_OK; | 725 | return GNUNET_OK; |
727 | } | 726 | } |
728 | 727 | ||
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 3bb05ace6..fae07b4cf 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -302,9 +302,7 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | |||
302 | int | 302 | int |
303 | GSF_handle_p2p_migration_stop_ (void *cls, | 303 | GSF_handle_p2p_migration_stop_ (void *cls, |
304 | const struct GNUNET_PeerIdentity *other, | 304 | const struct GNUNET_PeerIdentity *other, |
305 | const struct GNUNET_MessageHeader *message, | 305 | const struct GNUNET_MessageHeader *message); |
306 | const struct GNUNET_ATS_Information *atsi, | ||
307 | unsigned int atsi_count); | ||
308 | 306 | ||
309 | 307 | ||
310 | /** | 308 | /** |