gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r24928 - gnunet/src/datastore


From: gnunet
Subject: [GNUnet-SVN] r24928 - gnunet/src/datastore
Date: Tue, 13 Nov 2012 14:25:00 +0100

Author: grothoff
Date: 2012-11-13 14:25:00 +0100 (Tue, 13 Nov 2012)
New Revision: 24928

Modified:
   gnunet/src/datastore/plugin_datastore_sqlite.c
Log:
fixing bloomfilter reconstruction after quota change, iterator for sqlite 
failed to return keys due to off-by-one error

Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c      2012-11-13 13:09:47 UTC 
(rev 24927)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c      2012-11-13 13:25:00 UTC 
(rev 24928)
@@ -1082,9 +1082,11 @@
   }
   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");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]