nicer error handling
authorChristian Grothoff <christian@grothoff.org>
Wed, 26 May 2010 07:58:59 +0000 (07:58 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 26 May 2010 07:58:59 +0000 (07:58 +0000)
src/datastore/test_datastore_api.c

index ce3c18daa139a6ba0d27da9fef15fba285b6a377..b4f4f07da92245828fba22b4b3fcbf2f8d84716d 100644 (file)
@@ -291,8 +291,15 @@ check_multiple (void *cls,
 
   if (key == NULL)
     {
-      GNUNET_assert (crc->phase == RP_GET_MULTIPLE_DONE);
-      crc->phase = RP_UPDATE;
+      if (crc->phase != RP_GET_MULTIPLE_DONE)
+       {
+         GNUNET_break (0);
+         crc->phase = RP_ERROR;
+       }
+      else
+       {
+         crc->phase = RP_UPDATE;
+       }
       GNUNET_SCHEDULER_add_continuation (crc->sched,
                                         &run_continuation,
                                         crc,