be more lenient in the set api
authorFlorian Dold <florian.dold@gmail.com>
Tue, 29 Mar 2016 12:09:17 +0000 (12:09 +0000)
committerFlorian Dold <florian.dold@gmail.com>
Tue, 29 Mar 2016 12:09:17 +0000 (12:09 +0000)
src/set/set_api.c

index 6155410ef9f948fd8fefae6c883dc746228898eb..503c0c9c2889f02dddf675f8624bfee65109d842 100644 (file)
@@ -1041,7 +1041,13 @@ int
 GNUNET_SET_commit (struct GNUNET_SET_OperationHandle *oh,
                    struct GNUNET_SET_Handle *set)
 {
-  GNUNET_assert (NULL == oh->set);
+  if (NULL != oh->set)
+  {
+    /* Some other set was already commited for this
+     * operation, there is a logic bug in the client of this API */
+    GNUNET_break (0);
+    return GNUNET_OK;
+  }
   if (GNUNET_YES == set->invalid)
     return GNUNET_SYSERR;
   GNUNET_assert (NULL != oh->conclude_mqm);