aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_namestore_sqlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/plugin_namestore_sqlite.c')
-rw-r--r--src/namestore/plugin_namestore_sqlite.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index d062c81a1..6551dd4a2 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -455,11 +455,11 @@ namestore_sqlite_cache_block (void *cls,
455 455
456 namestore_sqlite_expire_blocks (plugin); 456 namestore_sqlite_expire_blocks (plugin);
457 GNUNET_CRYPTO_hash (&block->derived_key, 457 GNUNET_CRYPTO_hash (&block->derived_key,
458 sizeof (struct GNUNET_CRYPTO_EccPublicKey), 458 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
459 &query); 459 &query);
460 expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time); 460 expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time);
461 block_size = ntohl (block->purpose.size) + 461 block_size = ntohl (block->purpose.size) +
462 sizeof (struct GNUNET_CRYPTO_EccPublicKey) + 462 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
463 sizeof (struct GNUNET_CRYPTO_EccSignature); 463 sizeof (struct GNUNET_CRYPTO_EccSignature);
464 if (block_size > 64 * 65536) 464 if (block_size > 64 * 65536)
465 { 465 {
@@ -542,7 +542,7 @@ namestore_sqlite_lookup_block (void *cls,
542 block_size = sqlite3_column_bytes (plugin->lookup_block, 0); 542 block_size = sqlite3_column_bytes (plugin->lookup_block, 0);
543 if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || 543 if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) ||
544 (ntohl (block->purpose.size) + 544 (ntohl (block->purpose.size) +
545 sizeof (struct GNUNET_CRYPTO_EccPublicKey) + 545 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
546 sizeof (struct GNUNET_CRYPTO_EccSignature) != block_size) ) 546 sizeof (struct GNUNET_CRYPTO_EccSignature) != block_size) )
547 { 547 {
548 GNUNET_break (0); 548 GNUNET_break (0);
@@ -599,7 +599,7 @@ namestore_sqlite_store_records (void *cls,
599 for (i=0;i<rd_count;i++) 599 for (i=0;i<rd_count;i++)
600 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type) 600 if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type)
601 { 601 {
602 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicKey) == rd[i].data_size); 602 GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) == rd[i].data_size);
603 GNUNET_CRYPTO_hash (rd[i].data, 603 GNUNET_CRYPTO_hash (rd[i].data,
604 rd[i].data_size, 604 rd[i].data_size,
605 &pkey_hash); 605 &pkey_hash);
@@ -834,7 +834,7 @@ namestore_sqlite_iterate_records (void *cls,
834static int 834static int
835namestore_sqlite_zone_to_name (void *cls, 835namestore_sqlite_zone_to_name (void *cls,
836 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 836 const struct GNUNET_CRYPTO_EccPrivateKey *zone,
837 const struct GNUNET_CRYPTO_EccPublicKey *value_zone, 837 const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone,
838 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) 838 GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
839{ 839{
840 struct Plugin *plugin = cls; 840 struct Plugin *plugin = cls;
@@ -845,7 +845,7 @@ namestore_sqlite_zone_to_name (void *cls,
845 zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), 845 zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey),
846 SQLITE_STATIC)) || 846 SQLITE_STATIC)) ||
847 (SQLITE_OK != sqlite3_bind_blob (stmt, 2, 847 (SQLITE_OK != sqlite3_bind_blob (stmt, 2,
848 value_zone, sizeof (struct GNUNET_CRYPTO_EccPublicKey), 848 value_zone, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
849 SQLITE_STATIC)) ) 849 SQLITE_STATIC)) )
850 { 850 {
851 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, 851 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,