+ break;
+ case RP_GET:
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET",
+ crc->i);
+ GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key);
+ GNUNET_DATASTORE_get_key (datastore, crc->offset++, &crc->key,
+ get_type (crc->i), 1, 1,
+ &check_value,
+ crc);
+ break;
+ case RP_GET_FAIL:
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing `%s' number %u\n", "GET(f)",
+ crc->i);
+ GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key);
+ GNUNET_DATASTORE_get_key (datastore, crc->offset++, &crc->key,
+ get_type (crc->i), 1, 1,
+ &check_nothing,
+ crc);
+ break;
+ case RP_DONE:
+ GNUNET_assert (0 == crc->i);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished, disconnecting\n");
+ GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
+ GNUNET_free (crc);
+ ok = 0;
+ }
+}
+
+
+static void
+run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
+{
+ struct CpsRunContext *crc = cls;
+
+ if (success != GNUNET_YES)
+ {
+ FPRINTF (stderr,
+ "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n",
+ msg);
+ GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
+ GNUNET_free (crc);
+ return;
+ }
+ GNUNET_SCHEDULER_add_now (&run_continuation, crc);