diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-06 09:11:53 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-06 09:11:53 +0000 |
commit | 90eb61b35b4643f53e411e16a16c5a3cb9e53e80 (patch) | |
tree | 769c011537d11947fe75af5d0b4e2be4bedaf105 /src/namestore/plugin_namestore_sqlite.c | |
parent | 9239e7af2ddec7f0bdce670476f8aeed2327229e (diff) | |
download | gnunet-90eb61b35b4643f53e411e16a16c5a3cb9e53e80.tar.gz gnunet-90eb61b35b4643f53e411e16a16c5a3cb9e53e80.zip |
- reverting the change: we need the hash code to do the dht lookup
Diffstat (limited to 'src/namestore/plugin_namestore_sqlite.c')
-rw-r--r-- | src/namestore/plugin_namestore_sqlite.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index a6009611c..5dc52bcfc 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -467,7 +467,7 @@ namestore_sqlite_put_records (void *cls, | |||
467 | struct Plugin *plugin = cls; | 467 | struct Plugin *plugin = cls; |
468 | int n; | 468 | int n; |
469 | GNUNET_HashCode zone; | 469 | GNUNET_HashCode zone; |
470 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_delegation; | 470 | GNUNET_HashCode zone_delegation; |
471 | GNUNET_HashCode nh; | 471 | GNUNET_HashCode nh; |
472 | size_t name_len; | 472 | size_t name_len; |
473 | uint64_t rvalue; | 473 | uint64_t rvalue; |
@@ -480,13 +480,12 @@ namestore_sqlite_put_records (void *cls, | |||
480 | GNUNET_CRYPTO_hash (name, name_len, &nh); | 480 | GNUNET_CRYPTO_hash (name, name_len, &nh); |
481 | memset (&zone_delegation, 0, sizeof (zone_delegation)); | 481 | memset (&zone_delegation, 0, sizeof (zone_delegation)); |
482 | for (i=0;i<rd_count;i++) | 482 | for (i=0;i<rd_count;i++) |
483 | if (rd[i].record_type == GNUNET_NAMESTORE_TYPE_PKEY) | 483 | if (rd->record_type == GNUNET_GNS_TYPE_PKEY) |
484 | { | 484 | { |
485 | GNUNET_assert (sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) == rd[i].data_size); | 485 | GNUNET_assert (sizeof (GNUNET_HashCode) == rd->data_size); |
486 | GNUNET_break (0); | ||
487 | memcpy (&zone_delegation, | 486 | memcpy (&zone_delegation, |
488 | rd[i].data, | 487 | rd->data, |
489 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)); | 488 | sizeof (GNUNET_HashCode)); |
490 | break; | 489 | break; |
491 | } | 490 | } |
492 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); | 491 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); |