aboutsummaryrefslogtreecommitdiff
path: root/src/service/peerstore/peerstore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/peerstore/peerstore_api.c')
-rw-r--r--src/service/peerstore/peerstore_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/service/peerstore/peerstore_api.c b/src/service/peerstore/peerstore_api.c
index a69237c9b..3b945928a 100644
--- a/src/service/peerstore/peerstore_api.c
+++ b/src/service/peerstore/peerstore_api.c
@@ -864,7 +864,7 @@ hello_add_iter (void *cls, const struct GNUNET_PEERSTORE_Record *record,
864 struct GNUNET_PEERSTORE_StoreHelloContext *huc = cls; 864 struct GNUNET_PEERSTORE_StoreHelloContext *huc = cls;
865 struct GNUNET_TIME_Absolute hello_exp = 865 struct GNUNET_TIME_Absolute hello_exp =
866 GNUNET_HELLO_builder_get_expiration_time (huc->hello); 866 GNUNET_HELLO_builder_get_expiration_time (huc->hello);
867 if (NULL == record) 867 if ((NULL == record) && (NULL == emsg))
868 { 868 {
869 /** If we ever get here, we are newer than the existing record 869 /** If we ever get here, we are newer than the existing record
870 * or the only/first record. 870 * or the only/first record.
@@ -881,6 +881,12 @@ hello_add_iter (void *cls, const struct GNUNET_PEERSTORE_Record *record,
881 huc); 881 huc);
882 return; 882 return;
883 } 883 }
884 if (NULL != emsg)
885 {
886 LOG (GNUNET_ERROR_TYPE_ERROR, "%s\n", emsg);
887 GNUNET_PEERSTORE_iteration_next (huc->ic, 1);
888 return;
889 }
884 if (GNUNET_TIME_absolute_cmp (record->expiry, >, hello_exp)) 890 if (GNUNET_TIME_absolute_cmp (record->expiry, >, hello_exp))
885 { 891 {
886 huc->cont (huc->cont_cls, GNUNET_OK); 892 huc->cont (huc->cont_cls, GNUNET_OK);
@@ -889,6 +895,7 @@ hello_add_iter (void *cls, const struct GNUNET_PEERSTORE_Record *record,
889 GNUNET_free (huc); 895 GNUNET_free (huc);
890 return; 896 return;
891 } 897 }
898 GNUNET_PEERSTORE_iteration_next (huc->ic, 1);
892} 899}
893 900
894 901