aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/plugin_datastore_sqlite.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-11-13 13:25:00 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-11-13 13:25:00 +0000
commitd5d0c2930acdf20789dec61d2759f5e975c30f4b (patch)
treefa15dece8cb3f4bde5db249ceaac7e36de12b7b7 /src/datastore/plugin_datastore_sqlite.c
parentf98d59009b257c6c50a108ef21cb6824d80bca9b (diff)
fixing bloomfilter reconstruction after quota change, iterator for sqlite failed to return keys due to off-by-one error
git-svn-id: https://gnunet.org/svn/gnunet@24928 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/datastore/plugin_datastore_sqlite.c')
-rw-r--r--src/datastore/plugin_datastore_sqlite.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 01f6b9188c..e77e8b9fae 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -1082,9 +1082,11 @@ sqlite_plugin_get_keys (void *cls,
}
while (SQLITE_ROW == (ret = sqlite3_step (stmt)))
{
- key = sqlite3_column_blob (stmt, 1);
- if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1))
+ key = sqlite3_column_blob (stmt, 0);
+ if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 0))
proc (proc_cls, key, 1);
+ else
+ GNUNET_break (0);
}
if (SQLITE_DONE != ret)
LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite_step");