fix crash on namestore disconnect
authorChristian Grothoff <christian@grothoff.org>
Sun, 20 May 2018 19:05:18 +0000 (21:05 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sun, 20 May 2018 19:05:18 +0000 (21:05 +0200)
src/namestore/gnunet-zoneimport.c

index b394178a6ce2a653376ccba37f5531ccba30b07a..57be5da7104f086e213a70d81c0e47068f108f98 100644 (file)
@@ -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);
 }