aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_monitoring.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-30 16:22:47 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-30 16:22:47 +0200
commit4b5c6cceb0284774a161d426b606f40644abfb4c (patch)
treef2f63b8df7e6bb329ef25eca97e27d4deac55b69 /src/namestore/test_namestore_api_monitoring.c
parentc66809401efc16f2606db7e2c7b7ca8def8be14e (diff)
downloadgnunet-4b5c6cceb0284774a161d426b606f40644abfb4c.tar.gz
gnunet-4b5c6cceb0284774a161d426b606f40644abfb4c.zip
eliminate use of OFFSET in namestore DB queries
Diffstat (limited to 'src/namestore/test_namestore_api_monitoring.c')
-rw-r--r--src/namestore/test_namestore_api_monitoring.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index efbd6badf..68a3e4fb8 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -209,7 +209,9 @@ zone_proc (void *cls,
209 209
210 210
211static void 211static void
212put_cont (void *cls, int32_t success, const char *emsg) 212put_cont (void *cls,
213 int32_t success,
214 const char *emsg)
213{ 215{
214 static int c = 0; 216 static int c = 0;
215 char *label = cls; 217 char *label = cls;
@@ -232,10 +234,12 @@ put_cont (void *cls, int32_t success, const char *emsg)
232 else 234 else
233 { 235 {
234 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 236 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
235 "Failed to created records\n"); 237 "Failed to create record `%s'\n",
238 label);
236 GNUNET_break (0); 239 GNUNET_break (0);
237 GNUNET_SCHEDULER_cancel (endbadly_task); 240 GNUNET_SCHEDULER_cancel (endbadly_task);
238 endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL); 241 endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly,
242 NULL);
239 } 243 }
240} 244}
241 245
@@ -341,10 +345,16 @@ run (void *cls,
341 /* name in different zone */ 345 /* name in different zone */
342 GNUNET_asprintf(&s_name_3, "dummy3"); 346 GNUNET_asprintf(&s_name_3, "dummy3");
343 s_rd_3 = create_record(1); 347 s_rd_3 = create_record(1);
344 GNUNET_assert (NULL != (ns_ops[2] = GNUNET_NAMESTORE_records_store (nsh, privkey2, s_name_3, 348 GNUNET_assert (NULL != (ns_ops[2] =
345 1, s_rd_3, &put_cont, s_name_3))); 349 GNUNET_NAMESTORE_records_store (nsh,
346 350 privkey2,
347 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n"); 351 s_name_3,
352 1,
353 s_rd_3,
354 &put_cont,
355 s_name_3)));
356 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
357 "Created record 1\n");
348 GNUNET_asprintf(&s_name_1, "dummy1"); 358 GNUNET_asprintf(&s_name_1, "dummy1");
349 s_rd_1 = create_record(1); 359 s_rd_1 = create_record(1);
350 GNUNET_assert (NULL != (ns_ops[0] = GNUNET_NAMESTORE_records_store(nsh, privkey, s_name_1, 360 GNUNET_assert (NULL != (ns_ops[0] = GNUNET_NAMESTORE_records_store(nsh, privkey, s_name_1,