diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-07-25 14:30:10 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2009-07-25 14:30:10 +0000 |
commit | bc44fe1533ea7e9499531b1d537ee0fb5f5834b0 (patch) | |
tree | d46c3294cb791d674ab63829d3559c9a162404f1 /src/datastore/plugin_datastore_sqlite.c | |
parent | 2ec4721bac23839cc55fd58dbd415916a1ffba61 (diff) |
more tests
git-svn-id: https://gnunet.org/svn/gnunet@8776 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r-- | src/datastore/plugin_datastore_sqlite.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 9a807463a2..af4dcc3229 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c @@ -29,7 +29,7 @@ #include "plugin_datastore.h" #include <sqlite3.h> -#define DEBUG_SQLITE GNUNET_YES +#define DEBUG_SQLITE GNUNET_NO /** * After how many payload-changing operations @@ -44,7 +44,7 @@ * a failure of the command 'cmd' on file 'filename' * with the message given by strerror(errno). */ -#define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed with error: %s\n"), cmd, sqlite3_errmsg(db->dbh)); } while(0) +#define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed with error: %s"), cmd, sqlite3_errmsg(db->dbh)); } while(0) #define SELECT_IT_LOW_PRIORITY_1 \ "SELECT size,type,prio,anonLevel,expire,hash,value,_ROWID_ FROM gn080 WHERE (prio = ? AND hash > ?) "\ @@ -768,7 +768,7 @@ sqlite_plugin_update (void *cls, sqlite3_bind_int64 (plugin->updPrio, 2, expire.value); sqlite3_bind_int64 (plugin->updPrio, 3, uid); n = sqlite3_step (plugin->updPrio); - if (n != SQLITE_OK) + if (n != SQLITE_DONE) LOG_SQLITE (plugin, msg, GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK, "sqlite3_step"); @@ -782,7 +782,7 @@ sqlite_plugin_update (void *cls, if (n == SQLITE_BUSY) return GNUNET_NO; - return n == SQLITE_OK ? GNUNET_OK : GNUNET_SYSERR; + return n == SQLITE_DONE ? GNUNET_OK : GNUNET_SYSERR; } |