gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20301 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r20301 - gnunet/src/namestore
Date: Tue, 6 Mar 2012 10:11:53 +0100

Author: wachs
Date: 2012-03-06 10:11:53 +0100 (Tue, 06 Mar 2012)
New Revision: 20301

Modified:
   gnunet/src/namestore/plugin_namestore_sqlite.c
Log:
- reverting the change: we need the hash code to do the dht lookup


Modified: gnunet/src/namestore/plugin_namestore_sqlite.c
===================================================================
--- gnunet/src/namestore/plugin_namestore_sqlite.c      2012-03-06 08:51:19 UTC 
(rev 20300)
+++ gnunet/src/namestore/plugin_namestore_sqlite.c      2012-03-06 09:11:53 UTC 
(rev 20301)
@@ -467,7 +467,7 @@
   struct Plugin *plugin = cls;
   int n;
   GNUNET_HashCode zone;
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_delegation;
+  GNUNET_HashCode zone_delegation;
   GNUNET_HashCode nh;
   size_t name_len;
   uint64_t rvalue;
@@ -480,13 +480,12 @@
   GNUNET_CRYPTO_hash (name, name_len, &nh);
   memset (&zone_delegation, 0, sizeof (zone_delegation));
   for (i=0;i<rd_count;i++)
-    if (rd[i].record_type == GNUNET_NAMESTORE_TYPE_PKEY)
+    if (rd->record_type == GNUNET_GNS_TYPE_PKEY)
     {
-      GNUNET_assert (sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) 
== rd[i].data_size);
-      GNUNET_break (0);
+      GNUNET_assert (sizeof (GNUNET_HashCode) == rd->data_size);
       memcpy (&zone_delegation,
-             rd[i].data,
-             sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+             rd->data,
+             sizeof (GNUNET_HashCode));
       break;
     }
   rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]