bugfix
authorChristian Grothoff <christian@grothoff.org>
Tue, 29 Sep 2009 22:15:57 +0000 (22:15 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 29 Sep 2009 22:15:57 +0000 (22:15 +0000)
src/datastore/gnunet-service-datastore.c
src/datastore/test_datastore_api_management.c

index 220c114ebb659cc04fa8cf835386c4cde04f81f2..03dfb47c24536160cdfd56030c1ed8085be8282d 100644 (file)
@@ -899,6 +899,7 @@ handle_get (void *cls,
                  "Empty result set for `%s' request.\n",
                  "GET");
 #endif 
+      GNUNET_SERVER_client_keep (client);
       transmit_item (client,
                     NULL, NULL, 0, NULL, 0, 0, 0, 
                     GNUNET_TIME_UNIT_ZERO_ABS, 0);
index 54289dd7b3905b4f05546890bbc2701f565b6b20..22d4aff25c40f74273e413b00225804fdf057d1e 100644 (file)
@@ -202,11 +202,10 @@ check_nothing (void *cls,
             expiration, uint64_t uid)
 {
   struct CpsRunContext *crc = cls;
+
   GNUNET_assert (key == NULL);
-  if (crc->i == 0)
-    {
-      crc->phase = RP_DONE;
-    }
+  if (0 == --crc->i)
+    crc->phase = RP_DONE;
   GNUNET_SCHEDULER_add_continuation (crc->sched,
                                     GNUNET_NO,
                                     &run_continuation,
@@ -284,6 +283,7 @@ run_continuation (void *cls,
                            TIMEOUT);
       break;
     case RP_DONE:
+      GNUNET_assert (0 == crc->i);
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Finished, disconnecting\n");