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)
downloadgnunet-b5454a701bde16ebc577fbb87d09f5dc1ead587e.tar.gz
gnunet-b5454a701bde16ebc577fbb87d09f5dc1ead587e.zip
- 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 53838a542..7ec02f916 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,
605 * @param cls handle to connected peer entry 605 * @param cls handle to connected peer entry
606 * @param record peerstore record information 606 * @param record peerstore record information
607 * @param emsg error message, or NULL if no errors 607 * @param emsg error message, or NULL if no errors
608 * @return #GNUNET_NO to stop iterating since we only expect 0 or 1 records
609 */ 608 */
610static int 609static void
611peer_respect_cb (void *cls, 610peer_respect_cb (void *cls,
612 const struct GNUNET_PEERSTORE_Record *record, 611 const struct GNUNET_PEERSTORE_Record *record,
613 const char *emsg) 612 const char *emsg)
@@ -615,13 +614,18 @@ peer_respect_cb (void *cls,
615 struct GSF_ConnectedPeer *cp = cls; 614 struct GSF_ConnectedPeer *cp = cls;
616 615
617 GNUNET_assert (NULL != cp->respect_iterate_req); 616 GNUNET_assert (NULL != cp->respect_iterate_req);
618 cp->respect_iterate_req = NULL; 617 printf("Got a record!\n");
619 if ((NULL != record) && (sizeof (cp->disk_respect) == record->value_size)) 618 if ((NULL != record) && (sizeof (cp->disk_respect) == record->value_size))
620 cp->disk_respect = cp->ppd.respect = *((uint32_t *)record->value); 619 cp->disk_respect = cp->ppd.respect = *((uint32_t *)record->value);
621 GSF_push_start_ (cp); 620 GSF_push_start_ (cp);
622 if (NULL != cp->creation_cb) 621 if (NULL != cp->creation_cb)
623 cp->creation_cb (cp->creation_cb_cls, cp); 622 cp->creation_cb (cp->creation_cb_cls, cp);
624 return GNUNET_NO; 623 if (NULL != record)
624 {
625 printf("Cancelling!\n");
626 GNUNET_PEERSTORE_iterate_cancel (cp->respect_iterate_req);
627 cp->respect_iterate_req = NULL;
628 }
625} 629}
626 630
627 631