aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-13 13:25:00 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-13 13:25:00 +0000
commit06e76ff4f8c8a673b92f1726ef1181b73067b383 (patch)
treefa15dece8cb3f4bde5db249ceaac7e36de12b7b7
parentd977cfbf63528690a773d1fe0bf6dbfd1d41170f (diff)
downloadgnunet-06e76ff4f8c8a673b92f1726ef1181b73067b383.tar.gz
gnunet-06e76ff4f8c8a673b92f1726ef1181b73067b383.zip
fixing bloomfilter reconstruction after quota change, iterator for sqlite failed to return keys due to off-by-one error
-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 01f6b9188..e77e8b9fa 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,
1082 } 1082 }
1083 while (SQLITE_ROW == (ret = sqlite3_step (stmt))) 1083 while (SQLITE_ROW == (ret = sqlite3_step (stmt)))
1084 { 1084 {
1085 key = sqlite3_column_blob (stmt, 1); 1085 key = sqlite3_column_blob (stmt, 0);
1086 if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1)) 1086 if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 0))
1087 proc (proc_cls, key, 1); 1087 proc (proc_cls, key, 1);
1088 else
1089 GNUNET_break (0);
1088 } 1090 }
1089 if (SQLITE_DONE != ret) 1091 if (SQLITE_DONE != ret)
1090 LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite_step"); 1092 LOG_SQLITE (plugin, NULL, GNUNET_ERROR_TYPE_ERROR, "sqlite_step");