/*
* This file is part of GNUnet
- * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ * Copyright (C) 2009-2013 Christian Grothoff (and other contributing authors)
*
* GNUnet is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
*
* You should have received a copy of the GNU General Public License
* along with GNUnet; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
#else
#define ENULL &e
#define ENULL_DEFINED 1
-#define CHECK(a) if (! a) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "%s\n", e); sqlite3_free(e); }
+#define CHECK(a) if (! (a)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "%s\n", e); sqlite3_free(e); }
#endif
CHECK (SQLITE_OK ==
sqlite3_exec (plugin->dbh, "PRAGMA locking_mode=EXCLUSIVE", NULL, NULL,
ENULL));
- CHECK (SQLITE_OK ==
- sqlite3_exec (plugin->dbh, "PRAGMA count_changes=OFF", NULL, NULL,
- ENULL));
CHECK (SQLITE_OK ==
sqlite3_exec (plugin->dbh, "PRAGMA page_size=4092", NULL, NULL,
ENULL));
*/
static int
namecache_sqlite_cache_block (void *cls,
- const struct GNUNET_NAMESTORE_Block *block)
+ const struct GNUNET_GNSRECORD_Block *block)
{
struct Plugin *plugin = cls;
struct GNUNET_HashCode query;
int ret;
int sret;
size_t block_size;
- const struct GNUNET_NAMESTORE_Block *block;
+ const struct GNUNET_GNSRECORD_Block *block;
if (SQLITE_OK != sqlite3_bind_blob (plugin->lookup_block, 1,
query, sizeof (struct GNUNET_HashCode),
{
block = sqlite3_column_blob (plugin->lookup_block, 0);
block_size = sqlite3_column_bytes (plugin->lookup_block, 0);
- if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) ||
+ if ( (block_size < sizeof (struct GNUNET_GNSRECORD_Block)) ||
(ntohl (block->purpose.size) +
sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) +
sizeof (struct GNUNET_CRYPTO_EcdsaSignature) != block_size) )