aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-01 18:08:47 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-01 18:08:47 +0000
commit996a989c215bd8021b48424386ac1dfa420f52da (patch)
tree1b70a0cefc426d383011fe778ff559607e070fcc /src/namestore
parent84a9934f89765fda5882a0c9d4c3f401df62625e (diff)
- fixes
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-service-namestore.c10
-rw-r--r--src/namestore/namestore_api.c1
-rw-r--r--src/namestore/test_namestore_api.conf2
-rw-r--r--src/namestore/test_namestore_api_create.c4
-rw-r--r--src/namestore/test_namestore_api_lookup.c6
-rw-r--r--src/namestore/test_namestore_api_remove.c4
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c4
7 files changed, 19 insertions, 12 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index f25907b817..7bb6ddd916 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 a0fb794ada..cd85a35eb2 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 1683d13cf5..1b83e8f13a 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 c74c80b030..8566959b24 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 f6e86ac8f6..3943d9db2a 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 5dfdd1a011..6b0943f3da 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 8e71159fb3..85652874c1 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;
}