From: Matthias Wachs Date: Thu, 1 Mar 2012 18:08:47 +0000 (+0000) Subject: - fixes X-Git-Tag: initial-import-from-subversion-38251~14510 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=996a989c215bd8021b48424386ac1dfa420f52da;p=oweals%2Fgnunet.git - fixes --- diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index f25907b81..7bb6ddd91 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -109,11 +109,11 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) next = nc->next; for (no = nc->op_head; no != NULL; no = tmp) { + GNUNET_break (0); GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no); tmp = no->next; GNUNET_free (no); } - GNUNET_SERVER_client_drop(nc->client); GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); GNUNET_free (nc); @@ -364,7 +364,7 @@ static void handle_lookup_name (void *cls, return; } - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up record for name `%s'\n", name); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up record for name `%s' in zone `%s'\n", name, GNUNET_h2s(&ln_msg->zone)); /* do the actual lookup */ lnc.request_id = rid; @@ -469,6 +469,8 @@ static void handle_record_put (void *cls, GNUNET_HashCode zone_hash; GNUNET_CRYPTO_hash (zone_key, key_len, &zone_hash); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Putting %u record for name `%s' in zone `%s'\n", rd_count, name, GNUNET_h2s(&zone_hash)); + /* Database operation */ res = GSN_database->put_records(GSN_database->cls, zone_key, @@ -642,6 +644,8 @@ static void handle_record_create (void *cls, crc.nc = nc; crc.op_id = rid; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating record for name `%s' in zone `%s'\n", name_tmp, GNUNET_h2s(&pubkey_hash)); + /* Get existing records for name */ res = GSN_database->iterate_records(GSN_database->cls, &pubkey_hash, name_tmp, 0, &handle_create_record_it, &crc); @@ -850,6 +854,8 @@ static void handle_record_remove (void *cls, rrc.rd = rd; rrc.pkey = pkey; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing record for name `%s' in zone `%s'\n", name_tmp, GNUNET_h2s(&pubkey_hash)); + /* Database operation */ res = GSN_database->iterate_records (GSN_database->cls, &pubkey_hash, diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index a0fb794ad..cd85a35eb 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c @@ -767,6 +767,7 @@ GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h, int drop) while (NULL != (q = h->op_head)) { + GNUNET_break (0); GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, q); GNUNET_free (q); } diff --git a/src/namestore/test_namestore_api.conf b/src/namestore/test_namestore_api.conf index 1683d13cf..1b83e8f13 100644 --- a/src/namestore/test_namestore_api.conf +++ b/src/namestore/test_namestore_api.conf @@ -4,7 +4,7 @@ DEFAULTSERVICES = namestore UNIXPATH = /tmp/gnunet-p1-service-arm.sock [namestore] -PREFIX = valgrind --leak-check=full +#PREFIX = valgrind --leak-check=full AUTOSTART = YES UNIXPATH = /tmp/gnunet-service-namestore.sock UNIX_MATCH_UID = YES diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c index c74c80b03..8566959b2 100644 --- a/src/namestore/test_namestore_api_create.c +++ b/src/namestore/test_namestore_api_create.c @@ -331,7 +331,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_TIME_absolute_get_forever(), RECORDS, s_rd, s_signature, put_cont, s_name); - GNUNET_free (s_signature); + } @@ -362,7 +362,7 @@ main (int argc, char *argv[]) int ret; ret = check (); - + GNUNET_free (s_signature); return ret; } diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c index f6e86ac8f..3943d9db2 100644 --- a/src/namestore/test_namestore_api_lookup.c +++ b/src/namestore/test_namestore_api_lookup.c @@ -149,7 +149,7 @@ void name_lookup_proc (void *cls, failed = GNUNET_YES; } - if (0 != memcmp (signature, &s_signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) + if (0 != memcmp (signature, s_signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) { GNUNET_break (0); failed = GNUNET_YES; @@ -268,7 +268,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_TIME_absolute_get_forever(), RECORDS, s_rd, s_signature, put_cont, s_name); - GNUNET_free (s_signature); + } @@ -299,7 +299,7 @@ main (int argc, char *argv[]) int ret; ret = check (); - + GNUNET_free (s_signature); return ret; } diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 5dfdd1a01..6b0943f3d 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c @@ -304,7 +304,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_TIME_absolute_get_forever(), RECORDS, s_rd, s_signature, put_cont, s_name); - GNUNET_free (s_signature); + } @@ -335,7 +335,7 @@ main (int argc, char *argv[]) int ret; ret = check (); - + GNUNET_free (s_signature); return ret; } diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index 8e71159fb..85652874c 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c @@ -238,7 +238,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_TIME_absolute_get_forever(), RECORDS, s_rd, s_signature, put_cont, s_name); - GNUNET_free (s_signature); + } static int @@ -268,7 +268,7 @@ main (int argc, char *argv[]) int ret; ret = check (); - + GNUNET_free (s_signature); return ret; }