aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_namestore_sqlite.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-16 20:21:27 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-16 20:21:27 +0000
commitaccfd6bd85274da2f19e7230c8da6b273cfb2ece (patch)
tree60966194963795ff07b4da94f4efb6c46d6a23cf /src/namestore/plugin_namestore_sqlite.c
parent3d670727232e79b7e49a1df7ba9260db4e5798a0 (diff)
downloadgnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.tar.gz
gnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.zip
-another renaming fest for GNUNET_NAMESTORE_ to GNUNET_GNSRECORD_ symbols that were moved
Diffstat (limited to 'src/namestore/plugin_namestore_sqlite.c')
-rw-r--r--src/namestore/plugin_namestore_sqlite.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index 06c2a7639..ce7be2a20 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -457,7 +457,7 @@ namestore_sqlite_expire_blocks (struct Plugin *plugin)
457 */ 457 */
458static int 458static int
459namestore_sqlite_cache_block (void *cls, 459namestore_sqlite_cache_block (void *cls,
460 const struct GNUNET_NAMESTORE_Block *block) 460 const struct GNUNET_GNSRECORD_Block *block)
461{ 461{
462 struct Plugin *plugin = cls; 462 struct Plugin *plugin = cls;
463 struct GNUNET_HashCode query; 463 struct GNUNET_HashCode query;
@@ -580,13 +580,13 @@ namestore_sqlite_cache_block (void *cls,
580static int 580static int
581namestore_sqlite_lookup_block (void *cls, 581namestore_sqlite_lookup_block (void *cls,
582 const struct GNUNET_HashCode *query, 582 const struct GNUNET_HashCode *query,
583 GNUNET_NAMESTORE_BlockCallback iter, void *iter_cls) 583 GNUNET_GNSRECORD_BlockCallback iter, void *iter_cls)
584{ 584{
585 struct Plugin *plugin = cls; 585 struct Plugin *plugin = cls;
586 int ret; 586 int ret;
587 int sret; 587 int sret;
588 size_t block_size; 588 size_t block_size;
589 const struct GNUNET_NAMESTORE_Block *block; 589 const struct GNUNET_GNSRECORD_Block *block;
590 590
591 if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1, 591 if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1,
592 query, sizeof (struct GNUNET_HashCode), 592 query, sizeof (struct GNUNET_HashCode),
@@ -605,7 +605,7 @@ namestore_sqlite_lookup_block (void *cls,
605 { 605 {
606 block = sqlite3_column_blob (plugin->lookup_block, 0); 606 block = sqlite3_column_blob (plugin->lookup_block, 0);
607 block_size = sqlite3_column_bytes (plugin->lookup_block, 0); 607 block_size = sqlite3_column_bytes (plugin->lookup_block, 0);
608 if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || 608 if ( (block_size < sizeof (struct GNUNET_GNSRECORD_Block)) ||
609 (ntohl (block->purpose.size) + 609 (ntohl (block->purpose.size) +
610 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + 610 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
611 sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) ) 611 sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) )
@@ -660,7 +660,7 @@ namestore_sqlite_store_records (void *cls,
660 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, 660 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
661 const char *label, 661 const char *label,
662 unsigned int rd_count, 662 unsigned int rd_count,
663 const struct GNUNET_NAMESTORE_RecordData *rd) 663 const struct GNUNET_GNSRECORD_Data *rd)
664{ 664{
665 struct Plugin *plugin = cls; 665 struct Plugin *plugin = cls;
666 int n; 666 int n;
@@ -680,7 +680,7 @@ namestore_sqlite_store_records (void *cls,
680 break; 680 break;
681 } 681 }
682 rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); 682 rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX);
683 data_size = GNUNET_NAMESTORE_records_get_size (rd_count, rd); 683 data_size = GNUNET_GNSRECORD_records_get_size (rd_count, rd);
684 if (data_size > 64 * 65536) 684 if (data_size > 64 * 65536)
685 { 685 {
686 GNUNET_break (0); 686 GNUNET_break (0);
@@ -689,7 +689,7 @@ namestore_sqlite_store_records (void *cls,
689 { 689 {
690 char data[data_size]; 690 char data[data_size];
691 691
692 if (data_size != GNUNET_NAMESTORE_records_serialize (rd_count, rd, 692 if (data_size != GNUNET_GNSRECORD_records_serialize (rd_count, rd,
693 data_size, data)) 693 data_size, data))
694 { 694 {
695 GNUNET_break (0); 695 GNUNET_break (0);
@@ -817,10 +817,10 @@ get_record_and_call_iterator (struct Plugin *plugin,
817 } 817 }
818 else 818 else
819 { 819 {
820 struct GNUNET_NAMESTORE_RecordData rd[record_count]; 820 struct GNUNET_GNSRECORD_Data rd[record_count];
821 821
822 if (GNUNET_OK != 822 if (GNUNET_OK !=
823 GNUNET_NAMESTORE_records_deserialize (data_size, data, 823 GNUNET_GNSRECORD_records_deserialize (data_size, data,
824 record_count, rd)) 824 record_count, rd))
825 { 825 {
826 GNUNET_break (0); 826 GNUNET_break (0);
@@ -935,7 +935,7 @@ namestore_sqlite_zone_to_name (void *cls,
935 } 935 }
936 LOG (GNUNET_ERROR_TYPE_DEBUG, 936 LOG (GNUNET_ERROR_TYPE_DEBUG,
937 "Performing reverse lookup for `%s'\n", 937 "Performing reverse lookup for `%s'\n",
938 GNUNET_NAMESTORE_z2s (value_zone)); 938 GNUNET_GNSRECORD_z2s (value_zone));
939 939
940 return get_record_and_call_iterator (plugin, stmt, zone, iter, iter_cls); 940 return get_record_and_call_iterator (plugin, stmt, zone, iter, iter_cls);
941} 941}