aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_plugin_datastore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/test_plugin_datastore.c')
-rw-r--r--src/datastore/test_plugin_datastore.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index 4efad74be..d7dff1041 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -84,8 +84,7 @@ disk_utilization_change_cb (void *cls, int delta)
84 84
85 85
86static void 86static void
87test (void *cls, 87test (void *cls);
88 const struct GNUNET_SCHEDULER_TaskContext *tc);
89 88
90 89
91/** 90/**
@@ -98,10 +97,10 @@ test (void *cls,
98 * @param msg error message on error 97 * @param msg error message on error
99 */ 98 */
100static void 99static void
101put_continuation (void *cls, 100put_continuation (void *cls,
102 const struct GNUNET_HashCode *key, 101 const struct GNUNET_HashCode *key,
103 uint32_t size, 102 uint32_t size,
104 int status, 103 int status,
105 const char *msg) 104 const char *msg)
106{ 105{
107 struct CpsRunContext *crc = cls; 106 struct CpsRunContext *crc = cls;
@@ -241,7 +240,7 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api,
241 * the transport and core. 240 * the transport and core.
242 */ 241 */
243static void 242static void
244cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 243cleaning_task (void *cls)
245{ 244{
246 struct CpsRunContext *crc = cls; 245 struct CpsRunContext *crc = cls;
247 246
@@ -251,7 +250,7 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
251 250
252 251
253static void 252static void
254update_continuation (void *cls, 253update_continuation (void *cls,
255 int status, 254 int status,
256 const char *msg) 255 const char *msg)
257{ 256{
@@ -264,11 +263,13 @@ update_continuation (void *cls,
264 263
265 264
266static void 265static void
267test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 266test (void *cls)
268{ 267{
269 struct CpsRunContext *crc = cls; 268 struct CpsRunContext *crc = cls;
270 struct GNUNET_HashCode key; 269 struct GNUNET_HashCode key;
270 const struct GNUNET_SCHEDULER_TaskContext *tc;
271 271
272 tc = GNUNET_SCHEDULER_get_task_context ();
272 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 273 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
273 { 274 {
274 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n"); 275 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n");
@@ -302,9 +303,9 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
302 case RP_UPDATE: 303 case RP_UPDATE:
303 crc->api->update (crc->api->cls, 304 crc->api->update (crc->api->cls,
304 guid, 305 guid,
305 1, 306 1,
306 GNUNET_TIME_UNIT_ZERO_ABS, 307 GNUNET_TIME_UNIT_ZERO_ABS,
307 &update_continuation, 308 &update_continuation,
308 crc); 309 crc);
309 break; 310 break;
310 311
@@ -344,8 +345,8 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
344 char *libname; 345 char *libname;
345 346
346 if (GNUNET_OK != 347 if (GNUNET_OK !=
347 GNUNET_CONFIGURATION_get_value_string (cfg, 348 GNUNET_CONFIGURATION_get_value_string (cfg,
348 "DATASTORE", 349 "DATASTORE",
349 "DATABASE", 350 "DATABASE",
350 &name)) 351 &name))
351 { 352 {
@@ -366,7 +367,7 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg)
366 FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); 367 FPRINTF (stderr, "Failed to load plugin `%s'!\n", name);
367 GNUNET_free (libname); 368 GNUNET_free (libname);
368 GNUNET_free (name); 369 GNUNET_free (name);
369 ok = 77; /* mark test as skipped */ 370 ok = 77; /* mark test as skipped */
370 return NULL; 371 return NULL;
371 } 372 }
372 GNUNET_free (libname); 373 GNUNET_free (libname);