- fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 1 Mar 2012 18:08:47 +0000 (18:08 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 1 Mar 2012 18:08:47 +0000 (18:08 +0000)
src/namestore/gnunet-service-namestore.c
src/namestore/namestore_api.c
src/namestore/test_namestore_api.conf
src/namestore/test_namestore_api_create.c
src/namestore/test_namestore_api_lookup.c
src/namestore/test_namestore_api_remove.c
src/namestore/test_namestore_api_remove_not_existing_record.c

index f25907b8174e13a97772693a7a767952e1c2406f..7bb6ddd9166506911bdfd28df4f2b818c15239a8 100644 (file)
@@ -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,
index a0fb794ada90907de89b1597bec77afed67258bc..cd85a35eb2e4624dd297792f40631f11b2fc25cb 100644 (file)
@@ -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);
   }
index 1683d13cf5154b99a86d59cf2ee4ba43b19d0007..1b83e8f13a84d6f9ccae6a8740b53f59713827dd 100644 (file)
@@ -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
index c74c80b0301dad7168d34259fa518358d86415d5..8566959b2425f4d6cb47e777777c564c06e0ab60 100644 (file)
@@ -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;
 }
 
index f6e86ac8f68f0c659fc7202a0625f266b84e9081..3943d9db2a0a1d0155884cc7b4bfe22a5c50082e 100644 (file)
@@ -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;
 }
 
index 5dfdd1a01185614585700d122852036dfdabf23f..6b0943f3dafeb95ea87854a06ab55675f936b588 100644 (file)
@@ -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;
 }
 
index 8e71159fb3ed6fedd1644671aede01338c1aa861..85652874c1a7b06d5de8e71d4897aa8d0ad1bde2 100644 (file)
@@ -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;
 }