aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_monitoring.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-09 14:29:34 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-09 14:29:34 +0000
commit03374cc39814fa4bfb8d96e1165c688c44d8342f (patch)
treeed772250c49b39d82b9708ec8df0ee3e07e366d1 /src/namestore/test_namestore_api_monitoring.c
parent0c13a1e6fb0baffd83d413f313742a5f2b420297 (diff)
downloadgnunet-03374cc39814fa4bfb8d96e1165c688c44d8342f.tar.gz
gnunet-03374cc39814fa4bfb8d96e1165c688c44d8342f.zip
make namestore API less brittle/sublte to use
Diffstat (limited to 'src/namestore/test_namestore_api_monitoring.c')
-rw-r--r--src/namestore/test_namestore_api_monitoring.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index 2ea271d50..efbd6badf 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -215,11 +215,11 @@ put_cont (void *cls, int32_t success, const char *emsg)
215 char *label = cls; 215 char *label = cls;
216 216
217 if (0 == strcmp (label, s_name_1)) 217 if (0 == strcmp (label, s_name_1))
218 ns_ops[0] = NULL; 218 ns_ops[0] = NULL;
219 else if (0 == strcmp (label, s_name_2)) 219 else if (0 == strcmp (label, s_name_2))
220 ns_ops[1] = NULL; 220 ns_ops[1] = NULL;
221 else if (0 == strcmp (label, s_name_3)) 221 else if (0 == strcmp (label, s_name_3))
222 ns_ops[2] = NULL; 222 ns_ops[2] = NULL;
223 223
224 if (success == GNUNET_OK) 224 if (success == GNUNET_OK)
225 { 225 {
@@ -261,6 +261,20 @@ create_record (unsigned int count)
261 261
262 262
263static void 263static void
264fail_cb (void *cls)
265{
266 GNUNET_assert (0);
267}
268
269
270static void
271sync_cb (void *cls)
272{
273 /* do nothing */
274}
275
276
277static void
264run (void *cls, 278run (void *cls,
265 const struct GNUNET_CONFIGURATION_Handle *cfg, 279 const struct GNUNET_CONFIGURATION_Handle *cfg,
266 struct GNUNET_TESTING_Peer *peer) 280 struct GNUNET_TESTING_Peer *peer)
@@ -288,8 +302,11 @@ run (void *cls,
288 zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, 302 zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
289 privkey, 303 privkey,
290 GNUNET_YES, 304 GNUNET_YES,
305 &fail_cb,
306 NULL,
291 &zone_proc, 307 &zone_proc,
292 NULL, 308 NULL,
309 &sync_cb,
293 NULL); 310 NULL);
294 if (NULL == zm) 311 if (NULL == zm)
295 { 312 {