aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_datastore_api_management.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-26 00:34:16 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-26 00:34:16 +0100
commiteb1c2236158eba266de1bc91d75d9c6d0714252b (patch)
tree65f0c65a42524fb1529ffa8051a2f7181a813d8f /src/datastore/test_datastore_api_management.c
parent07f48a8e74b61f518a4b169075cb0a1cb1419166 (diff)
fix crash in test if DB did not yet exist
Diffstat (limited to 'src/datastore/test_datastore_api_management.c')
-rw-r--r--src/datastore/test_datastore_api_management.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 5e536d6c5f..9a3e5446bf 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -298,7 +298,21 @@ run (void *cls,
/**
- * check if plugin is actually working
+ * Function called when disk utilization changes, does nothing.
+ *
+ * @param cls closure
+ * @param delta change in utilization
+ */
+static void
+ignore_payload_cb (void *cls,
+ int delta)
+{
+ /* do nothing */
+}
+
+
+/**
+ * check if plugin is actually working
*/
static int
test_plugin (const char *cfg_name)
@@ -307,7 +321,7 @@ test_plugin (const char *cfg_name)
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_DATASTORE_PluginFunctions *api;
struct GNUNET_DATASTORE_PluginEnvironment env;
-
+
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_OK !=
GNUNET_CONFIGURATION_load (cfg,
@@ -321,6 +335,7 @@ test_plugin (const char *cfg_name)
}
memset (&env, 0, sizeof (env));
env.cfg = cfg;
+ env.duc = &ignore_payload_cb;
GNUNET_snprintf (libname,
sizeof (libname),
"libgnunet_plugin_datastore_%s",