aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:43:47 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-03-21 14:43:47 +0000
commit75c121f5ae37d3c7ccd95f4449aea33ccb4200f0 (patch)
tree3fb440657f99a826cc4f963db55e28cb426ed9d8 /src/fs/gnunet-service-fs.c
parenteb2371484330014aaef9b0bfac1f1ae191bc2460 (diff)
downloadgnunet-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.c21
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 */
268static int 268static int
269handle_p2p_put (void *cls, const struct GNUNET_PeerIdentity *other, 269handle_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 */
350static int 349static int
351handle_p2p_get (void *cls, const struct GNUNET_PeerIdentity *other, 350handle_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 */
538static void 536static void
539peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, 537peer_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);