diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-25 23:22:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-25 23:22:33 +0000 |
commit | 124f3e77a5e022f5f7ab49df49023d0080bcbbb4 (patch) | |
tree | 2c88e59709c52594d2c98c6df52671419c957162 /src/fs/gnunet-service-fs.c | |
parent | 8306257cfea6b5ca5d7cd0119b8d1369f422a07f (diff) | |
download | gnunet-124f3e77a5e022f5f7ab49df49023d0080bcbbb4.tar.gz gnunet-124f3e77a5e022f5f7ab49df49023d0080bcbbb4.zip |
-reduce calls in get_latest()
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index a4300a4ce..b4f336a6c 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -355,7 +355,8 @@ consider_forwarding (void *cls, | |||
355 | { | 355 | { |
356 | if (GNUNET_BLOCK_EVALUATION_OK_LAST == result) | 356 | if (GNUNET_BLOCK_EVALUATION_OK_LAST == result) |
357 | return; /* we're done... */ | 357 | return; /* we're done... */ |
358 | GSF_iterate_connected_peers_ (&consider_request_for_forwarding, pr); | 358 | GSF_iterate_connected_peers_ (&consider_request_for_forwarding, |
359 | pr); | ||
359 | } | 360 | } |
360 | 361 | ||
361 | 362 | ||
@@ -376,12 +377,14 @@ handle_p2p_get (void *cls, | |||
376 | { | 377 | { |
377 | struct GSF_PendingRequest *pr; | 378 | struct GSF_PendingRequest *pr; |
378 | 379 | ||
379 | pr = GSF_handle_p2p_query_ (other, message); | 380 | pr = GSF_handle_p2p_query_ (other, |
381 | message); | ||
380 | if (NULL == pr) | 382 | if (NULL == pr) |
381 | return GNUNET_SYSERR; | 383 | return GNUNET_OK; /* exists, identical to existing request, or malformed */ |
382 | GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES; | 384 | GSF_pending_request_get_data_ (pr)->has_started = GNUNET_YES; |
383 | GSF_local_lookup_ (pr, | 385 | GSF_local_lookup_ (pr, |
384 | &consider_forwarding, NULL); | 386 | &consider_forwarding, |
387 | NULL); | ||
385 | return GNUNET_OK; | 388 | return GNUNET_OK; |
386 | } | 389 | } |
387 | 390 | ||