[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5218 - GNUnet/src/applications/sqstore_sqlite
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5218 - GNUnet/src/applications/sqstore_sqlite |
Date: |
Mon, 2 Jul 2007 00:48:05 -0600 (MDT) |
Author: grothoff
Date: 2007-07-02 00:48:05 -0600 (Mon, 02 Jul 2007)
New Revision: 5218
Modified:
GNUnet/src/applications/sqstore_sqlite/sqlite.c
Log:
nh
Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c 2007-07-02 06:45:12 UTC
(rev 5217)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c 2007-07-02 06:48:05 UTC
(rev 5218)
@@ -38,8 +38,6 @@
#define DEBUG_SQLITE NO
-#define EXTRA_CHECKS YES
-
/**
* Die with an error message that indicates
* a failure of the command 'cmd' with the message given
@@ -353,10 +351,6 @@
/* benchmarking shows 2-12% overhead */
}
-#if EXTRA_CHECKS
-#include "ecrs_core.h"
-#endif
-
/**
* Given a full row from gn070 table
(size,type,prio,anonLevel,expire,hash,value),
* assemble it into a Datastore_Datum representation.
@@ -437,24 +431,6 @@
memcpy(&value[1],
sqlite3_column_blob(stmt, 6),
contentSize);
-#if EXTRA_CHECKS
- if (ntohl(value->type) == D_BLOCK) {
- HashCode512 hc;
- DBlock * db;
-
- db = (DBlock*) &value[1];
- GE_BREAK(NULL,
- ntohl(db->type) == D_BLOCK);
- hash(&db[1],
- contentSize - sizeof(DBlock),
- &hc);
- GE_BREAK(NULL,
- 0 == memcmp(&hc,
- &datum->key,
- sizeof(HashCode512)));
- }
-#endif
-
return datum;
}
@@ -1126,27 +1102,6 @@
GE_BREAK(ectx, 0);
return SYSERR;
}
-
-#if EXTRA_CHECKS
- if (ntohl(value->type) == D_BLOCK) {
- HashCode512 hc;
- DBlock * db;
-
- contentSize = ntohl(value->size)-sizeof(Datastore_Value);
- db = (DBlock*) &value[1];
- GE_BREAK(NULL,
- ntohl(db->type) == D_BLOCK);
- hash(&db[1],
- contentSize - sizeof(DBlock),
- &hc);
- if (0 != memcmp(&hc,
- key,
- sizeof(HashCode512))) {
- GE_BREAK(NULL, 0);
- }
- }
-#endif
-
dbh = getDBHandle();
if (db->lastSync > 1000)
syncStats(dbh);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5218 - GNUnet/src/applications/sqstore_sqlite,
gnunet <=