[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3874 - GNUnet/src/applications/dstore
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3874 - GNUnet/src/applications/dstore |
Date: |
Sun, 3 Dec 2006 17:50:31 -0800 (PST) |
Author: grothoff
Date: 2006-12-03 17:50:30 -0800 (Sun, 03 Dec 2006)
New Revision: 3874
Modified:
GNUnet/src/applications/dstore/dstore.c
Log:
fix
Modified: GNUnet/src/applications/dstore/dstore.c
===================================================================
--- GNUnet/src/applications/dstore/dstore.c 2006-12-04 01:41:39 UTC (rev
3873)
+++ GNUnet/src/applications/dstore/dstore.c 2006-12-04 01:50:30 UTC (rev
3874)
@@ -174,7 +174,7 @@
payload += size;
if (payload > quota) {
if ( (sq_prepare(dbh,
- "SELECT * FROM ds071 ORDER BY puttime ASC",
+ "SELECT size, type, puttime, expire, key, value FROM ds071
ORDER BY puttime ASC",
&stmt) == SQLITE_OK) &&
(sq_prepare(dbh,
"DELETE FROM ds071 "
@@ -229,7 +229,7 @@
}
db_init(dbh);
if (sq_prepare(dbh,
- "SELECT * FROM ds071 WHERE key=? AND type=?",
+ "SELECT size, type, puttime, expire, key, value FROM ds071
WHERE key=? AND type=?",
&stmt) != SQLITE_OK) {
sqlite3_close(dbh);
MUTEX_UNLOCK(lock);
@@ -245,15 +245,15 @@
type);
cnt = 0;
while (sqlite3_step(stmt) == SQLITE_ROW) {
- size = sqlite3_column_int(stmt, 1);
- if (size != sqlite3_column_bytes(stmt, 6)) {
+ size = sqlite3_column_int(stmt, 0);
+ if (size != sqlite3_column_bytes(stmt, 5)) {
GE_BREAK(NULL, 0);
continue;
}
- expire = sqlite3_column_int64(stmt, 4);
+ expire = sqlite3_column_int64(stmt, 3);
if (expire < get_time())
continue;
- dat = sqlite3_column_blob(stmt, 6);
+ dat = sqlite3_column_blob(stmt, 5);
handler(key,
type,
size,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3874 - GNUnet/src/applications/dstore,
grothoff <=