From 597539814533500b36b9d11ddf3868294b9e1ac2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 20 May 2018 21:05:18 +0200 Subject: fix crash on namestore disconnect --- src/namestore/gnunet-zoneimport.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index b394178a6..57be5da71 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c @@ -1493,6 +1493,16 @@ do_shutdown (void *cls) } +/** + * Iterate over all of the zones we care about and see which records + * we may need to re-fetch when. + * + * @param cls NULL + */ +static void +iterate_zones (void *cls); + + /** * Function called if #GNUNET_NAMESTORE_records_lookup() failed. * Just logs an error. @@ -1507,6 +1517,9 @@ ns_lookup_error_cb (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Failed to load data from namestore for zone `%s'\n", zone->domain); + zone_it = NULL; + ns_iterator_trigger_next = 0; + iterate_zones (NULL); } -- cgit v1.2.3