From: Christian Grothoff Date: Wed, 6 Apr 2011 14:05:45 +0000 (+0000) Subject: fixc X-Git-Tag: initial-import-from-subversion-38251~18760 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=50ffbcc86ee995fa741860bcdd9546a231edf2a7;p=oweals%2Fgnunet.git fixc --- diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index f6b5cd609..ef3736950 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c @@ -1272,6 +1272,8 @@ process_result_message (void *cls, ntohl(dm->size), GNUNET_h2s(&dm->key)); #endif + if (GNUNET_YES == qe->one_shot) + free_queue_entry (qe); h->retry_time.rel_value = 0; rc.iter (rc.iter_cls, &dm->key, @@ -1282,8 +1284,6 @@ process_result_message (void *cls, ntohl(dm->anonymity), GNUNET_TIME_absolute_ntoh(dm->expiration), GNUNET_ntohll(dm->uid)); - if (GNUNET_YES == qe->one_shot) - free_queue_entry (qe); } diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index dde63c85f..1a4514a1a 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -540,6 +540,10 @@ transmit_callback (void *cls, tcc->tc (tcc->tc_cls, GNUNET_OK); if (GNUNET_YES == tcc->end) { +#if DEBUG_DATASTORE + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Done processing client request\n"); +#endif GNUNET_SERVER_receive_done (tcc->client, GNUNET_OK); } else @@ -750,7 +754,8 @@ transmit_item (void *cls, gettext_noop ("# results found"), 1, GNUNET_NO); - transmit (client, &dm->header, &get_next, next_cls, GNUNET_NO); + transmit (client, &dm->header, &get_next, next_cls, + (next_cls != NULL) ? GNUNET_NO : GNUNET_YES); return GNUNET_OK; } diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index be2bc477b..07f856b23 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c @@ -226,27 +226,29 @@ run_continuation (void *cls, if (i > 255) memset (data, i - 255, size / 2); data[0] = k; - GNUNET_DATASTORE_put (datastore, - 0, - &key, - size, - data, - i+1, - GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100), - i, 0, - GNUNET_TIME_relative_to_absolute - (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, - GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), - 1, 1, TIMEOUT, - &check_success, - crc); + GNUNET_assert (NULL != + GNUNET_DATASTORE_put (datastore, + 0, + &key, + size, + data, + i+1, + GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 100), + i, 0, + GNUNET_TIME_relative_to_absolute + (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, + GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 1000))), + 1, 1, TIMEOUT, + &check_success, + crc)); break; case RP_CUT: /* trim down below MAX_SIZE again */ - GNUNET_DATASTORE_get_for_replication (datastore, - 1, 1, TIMEOUT, - &delete_value, - crc); + GNUNET_assert (NULL != + GNUNET_DATASTORE_get_for_replication (datastore, + 1, 1, TIMEOUT, + &delete_value, + crc)); break; case RP_REPORT: printf ( diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 216d9b7cf..fd10a38cb 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c @@ -31,7 +31,7 @@ /** * Enable or disable logging debug messages. */ -#define DEBUG_SQLITE GNUNET_YES +#define DEBUG_SQLITE GNUNET_NO /** * We allocate items on the stack at times. To prevent a stack