[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r300 - GNUnet/src/applications/sqstore_sqlite
From: |
grothoff |
Subject: |
[GNUnet-SVN] r300 - GNUnet/src/applications/sqstore_sqlite |
Date: |
Thu, 24 Feb 2005 22:11:38 -0800 (PST) |
Author: grothoff
Date: 2005-02-24 22:11:37 -0800 (Thu, 24 Feb 2005)
New Revision: 300
Modified:
GNUnet/src/applications/sqstore_sqlite/sqlite.c
GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
Log:
sqlite test now passes
Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c 2005-02-25 04:29:47 UTC
(rev 299)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c 2005-02-25 06:11:37 UTC
(rev 300)
@@ -402,11 +402,6 @@
lastPrio,
lastExp);
*/
- printf("FOUND %4u: exp %20lld old: %20lld - %d\n",
- (ntohl(datum->value.size) - sizeof(Datastore_Value))/8,
- ntohll(datum->value.expirationTime),
- lastExp,
- ntohll(datum->value.expirationTime) > lastExp);
if (iter != NULL) {
MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
Modified: GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2005-02-25 04:29:47 UTC
(rev 299)
+++ GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2005-02-25 06:11:37 UTC
(rev 300)
@@ -21,8 +21,8 @@
value->size = htonl(sizeof(Datastore_Value) + 8 * i);
value->type = htonl(i);
value->prio = htonl(i+1);
- value->anonymityLevel = i;
- value->expirationTime = now - i * cronSECONDS;
+ value->anonymityLevel = htonl(i);
+ value->expirationTime = htonll(now - i * cronSECONDS);
memset(&value[1], i, 8*i);
return value;
}
@@ -42,10 +42,11 @@
ntohl(val->size)) ) )
ret = OK;
else {
+ /*
printf("Wanted: %u, %llu; got %u, %llu - %d\n",
ntohl(value->size), ntohll(value->expirationTime),
ntohl(val->size), ntohll(val->expirationTime),
- memcmp(val, value, ntohl(val->size)));
+ memcmp(val, value, ntohl(val->size))); */
ret = SYSERR;
}
FREE(value);
@@ -82,6 +83,7 @@
int i;
cronTime(&now);
+ now = 1000000;
oldSize = api->getSize();
for (i=0;i<256;i++) {
value = initValue(i);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r300 - GNUnet/src/applications/sqstore_sqlite,
grothoff <=