aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_cp.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-05-29 11:19:50 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-05-29 11:19:50 +0000
commitb5454a701bde16ebc577fbb87d09f5dc1ead587e (patch)
treeaf5eac846653e86cff5bf158a1e740459fd438e5 /src/fs/gnunet-service-fs_cp.c
parente0c01618605c1ef2901b2002aed6801858603305 (diff)
- Fix #4532
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r--src/fs/gnunet-service-fs_cp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 53838a542c..7ec02f916c 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -605,9 +605,8 @@ ats_reserve_callback (void *cls,
* @param cls handle to connected peer entry
* @param record peerstore record information
* @param emsg error message, or NULL if no errors
- * @return #GNUNET_NO to stop iterating since we only expect 0 or 1 records
*/
-static int
+static void
peer_respect_cb (void *cls,
const struct GNUNET_PEERSTORE_Record *record,
const char *emsg)
@@ -615,13 +614,18 @@ peer_respect_cb (void *cls,
struct GSF_ConnectedPeer *cp = cls;
GNUNET_assert (NULL != cp->respect_iterate_req);
- cp->respect_iterate_req = NULL;
+ printf("Got a record!\n");
if ((NULL != record) && (sizeof (cp->disk_respect) == record->value_size))
cp->disk_respect = cp->ppd.respect = *((uint32_t *)record->value);
GSF_push_start_ (cp);
if (NULL != cp->creation_cb)
cp->creation_cb (cp->creation_cb_cls, cp);
- return GNUNET_NO;
+ if (NULL != record)
+ {
+ printf("Cancelling!\n");
+ GNUNET_PEERSTORE_iterate_cancel (cp->respect_iterate_req);
+ cp->respect_iterate_req = NULL;
+ }
}