namestore: postgres: fix iterating over zone
authorDaniel Golle <daniel@makrotopia.org>
Fri, 23 Jun 2017 11:54:40 +0000 (13:54 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 23 Jun 2017 12:18:55 +0000 (14:18 +0200)
Stop iterating on GNUNET_DB_STATUS_SUCCESS_NO_RESULTS.

src/namestore/plugin_namestore_postgres.c

index b1a6529aafe4dfdf0ddda46459b89a535b1e843d..c2ea3d0a643488f2704b2b83e207d6830ced1fa6 100644 (file)
@@ -432,6 +432,10 @@ namestore_postgres_iterate_records (void *cls,
   }
   if (res < 0)
     return GNUNET_SYSERR;
+
+  if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == res)
+    return GNUNET_NO;
+
   return GNUNET_OK;
 }