diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2016-05-29 11:19:50 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2016-05-29 11:19:50 +0000 |
commit | b5454a701bde16ebc577fbb87d09f5dc1ead587e (patch) | |
tree | af5eac846653e86cff5bf158a1e740459fd438e5 /src/peerstore | |
parent | e0c01618605c1ef2901b2002aed6801858603305 (diff) |
- Fix #4532
Diffstat (limited to 'src/peerstore')
-rw-r--r-- | src/peerstore/gnunet-service-peerstore.c | 5 | ||||
-rw-r--r-- | src/peerstore/peerstore_api.c | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c index 048201c776..af6438bb25 100644 --- a/src/peerstore/gnunet-service-peerstore.c +++ b/src/peerstore/gnunet-service-peerstore.c @@ -251,7 +251,7 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) * @param emsg error message or NULL if no errors * @return #GNUNET_YES to continue iteration */ -static int +static void record_iterator (void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg) { @@ -270,7 +270,7 @@ record_iterator (void *cls, const struct GNUNET_PEERSTORE_Record *record, GNUNET_SERVER_receive_done (cls_record->client, NULL == emsg ? GNUNET_OK : GNUNET_SYSERR); PEERSTORE_destroy_record (cls_record); - return GNUNET_NO; + return; } srm = @@ -282,7 +282,6 @@ record_iterator (void *cls, const struct GNUNET_PEERSTORE_Record *record, (struct GNUNET_MessageHeader *) srm, GNUNET_NO); GNUNET_free (srm); - return GNUNET_YES; } diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c index f1c5ccd322..0339ff93a4 100644 --- a/src/peerstore/peerstore_api.c +++ b/src/peerstore/peerstore_api.c @@ -670,7 +670,6 @@ handle_iterate_result (void *cls, const struct GNUNET_MessageHeader *msg) void *callback_cls; uint16_t msg_type; struct GNUNET_PEERSTORE_Record *record; - int continue_iter; ic = h->iterate_head; if (NULL == ic) @@ -704,16 +703,13 @@ handle_iterate_result (void *cls, const struct GNUNET_MessageHeader *msg) { record = PEERSTORE_parse_record_message (msg); if (NULL == record) - continue_iter = - callback (callback_cls, NULL, + callback (callback_cls, NULL, _("Received a malformed response from service.")); else { - continue_iter = callback (callback_cls, record, NULL); + callback (callback_cls, record, NULL); PEERSTORE_destroy_record (record); } - if (GNUNET_NO == continue_iter) - ic->callback = NULL; } } |