diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-03-14 22:40:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-03-14 22:40:04 +0000 |
commit | 4c1791f13283df27338cd877e2087d519aaab05e (patch) | |
tree | b852de95aa307225befc78c54624811f3a79e344 /src/datastore/test_datastore_api.c | |
parent | 165f050555ce4f06380cc26c1dc09235c7b135e6 (diff) | |
download | gnunet-4c1791f13283df27338cd877e2087d519aaab05e.tar.gz gnunet-4c1791f13283df27338cd877e2087d519aaab05e.zip |
-bugfix, adding comments, fixing indent
Diffstat (limited to 'src/datastore/test_datastore_api.c')
-rw-r--r-- | src/datastore/test_datastore_api.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index c50543210..12f2ef762 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c | |||
@@ -197,7 +197,7 @@ check_success (void *cls, | |||
197 | if (GNUNET_OK != success) | 197 | if (GNUNET_OK != success) |
198 | { | 198 | { |
199 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 199 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
200 | "Operation %d/%d not successfull: `%s'\n", | 200 | "Operation %d/%d not successful: `%s'\n", |
201 | crc->phase, | 201 | crc->phase, |
202 | crc->i, | 202 | crc->i, |
203 | msg); | 203 | msg); |
@@ -410,8 +410,7 @@ run_continuation (void *cls, | |||
410 | { | 410 | { |
411 | case RP_PUT: | 411 | case RP_PUT: |
412 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 412 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
413 | "Executing `%s' number %u\n", | 413 | "Executing PUT number %u\n", |
414 | "PUT", | ||
415 | crc->i); | 414 | crc->i); |
416 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); | 415 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); |
417 | GNUNET_DATASTORE_put (datastore, 0, &crc->key, get_size (crc->i), | 416 | GNUNET_DATASTORE_put (datastore, 0, &crc->key, get_size (crc->i), |
@@ -426,19 +425,17 @@ run_continuation (void *cls, | |||
426 | case RP_GET: | 425 | case RP_GET: |
427 | crc->i--; | 426 | crc->i--; |
428 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 427 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
429 | "Executing `%s' number %u\n", | 428 | "Executing GET number %u\n", |
430 | "GET", | ||
431 | crc->i); | 429 | crc->i); |
432 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); | 430 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); |
433 | GNUNET_DATASTORE_get_key (datastore, crc->offset, &crc->key, | 431 | GNUNET_DATASTORE_get_key (datastore, crc->offset, &crc->key, |
434 | get_type (crc->i), 1, 1, TIMEOUT, &check_value, | 432 | get_type (crc->i), 1, 1, TIMEOUT, |
435 | crc); | 433 | &check_value, crc); |
436 | break; | 434 | break; |
437 | case RP_DEL: | 435 | case RP_DEL: |
438 | crc->i--; | 436 | crc->i--; |
439 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 437 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
440 | "Executing `%s' number %u\n", | 438 | "Executing DEL number %u\n", |
441 | "DEL", | ||
442 | crc->i); | 439 | crc->i); |
443 | crc->data = NULL; | 440 | crc->data = NULL; |
444 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); | 441 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); |
@@ -449,8 +446,7 @@ run_continuation (void *cls, | |||
449 | break; | 446 | break; |
450 | case RP_DO_DEL: | 447 | case RP_DO_DEL: |
451 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 448 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
452 | "Executing `%s' number %u\n", | 449 | "Executing DO_DEL number %u\n", |
453 | "DO_DEL", | ||
454 | crc->i); | 450 | crc->i); |
455 | if (crc->i == 0) | 451 | if (crc->i == 0) |
456 | { | 452 | { |
@@ -469,8 +465,8 @@ run_continuation (void *cls, | |||
469 | case RP_DELVALIDATE: | 465 | case RP_DELVALIDATE: |
470 | crc->i--; | 466 | crc->i--; |
471 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 467 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
472 | "Executing `%s' number %u\n", | 468 | "Executing DELVALIDATE number %u\n", |
473 | "DEL-VALIDATE", crc->i); | 469 | crc->i); |
474 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); | 470 | GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key); |
475 | GNUNET_assert (NULL != | 471 | GNUNET_assert (NULL != |
476 | GNUNET_DATASTORE_get_key (datastore, crc->offset, &crc->key, | 472 | GNUNET_DATASTORE_get_key (datastore, crc->offset, &crc->key, |