[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r306 - in GNUnet/src/applications/fs: ecrs lib
From: |
grothoff |
Subject: |
[GNUnet-SVN] r306 - in GNUnet/src/applications/fs: ecrs lib |
Date: |
Fri, 25 Feb 2005 02:32:38 -0800 (PST) |
Author: grothoff
Date: 2005-02-25 02:31:59 -0800 (Fri, 25 Feb 2005)
New Revision: 306
Modified:
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/unindex.c
GNUnet/src/applications/fs/lib/fslib.c
Log:
fixes
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2005-02-25 09:49:29 UTC (rev
305)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2005-02-25 10:31:59 UTC (rev
306)
@@ -175,11 +175,11 @@
int main(int argc, char * argv[]){
static unsigned int filesizes[] = {
- 1,
+ /* 1,
2,
4,
16,
- 32,
+ 32, */
1024,
DBLOCK_SIZE - 1,
DBLOCK_SIZE,
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2005-02-25 09:49:29 UTC (rev
305)
+++ GNUnet/src/applications/fs/ecrs/search.c 2005-02-25 10:31:59 UTC (rev
306)
@@ -275,6 +275,7 @@
SendQueriesContext * sqc) {
ECRS_FileInfo fi;
struct ECRS_URI uri;
+ int ret;
if (OK != ECRS_deserializeMetaData(&fi.meta,
(char*)&nb[1],
@@ -286,9 +287,9 @@
uri.type = sks;
uri.data.sks.namespace = nb->namespace;
uri.data.sks.identifier = nb->rootEntry;
- sqc->spcb(&fi, key, sqc->spcbClosure);
+ ret = sqc->spcb(&fi, key, sqc->spcbClosure);
ECRS_freeMetaData(fi.meta);
- return OK;
+ return ret;
}
/**
@@ -359,9 +360,12 @@
ECRS_freeMetaData(fi.meta);
return SYSERR;
}
+ printf("ECRS Search Result...\n");
ret = sqc->spcb(&fi,
&ps->decryptKey,
sqc->spcbClosure);
+ printf("ECRS Search Result: %d\n",
+ ret);
ECRS_freeUri(fi.uri);
ECRS_freeMetaData(fi.meta);
return ret;
Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c 2005-02-25 09:49:29 UTC (rev
305)
+++ GNUnet/src/applications/fs/ecrs/unindex.c 2005-02-25 10:31:59 UTC (rev
306)
@@ -61,17 +61,20 @@
DBlock * db;
CHK ichk;
- size = ntohl(iblocks[level]->size) - sizeof(Datastore_Value) -
sizeof(DBlock);
- present = size / sizeof(CHK);
+ size = ntohl(iblocks[level]->size) - sizeof(Datastore_Value);
+ present = (size - sizeof(DBlock)) / sizeof(CHK);
db = (DBlock*) &iblocks[level][1];
if (present == CHK_PER_INODE) {
fileBlockGetKey(db,
- size + sizeof(DBlock),
+ size,
&ichk.key);
fileBlockGetQuery(db,
- size + sizeof(DBlock),
+ size,
&ichk.query);
- if (OK != pushBlock(sock, &ichk, level+1, iblocks))
+ if (OK != pushBlock(sock,
+ &ichk,
+ level+1,
+ iblocks))
return SYSERR;
fileBlockEncode(db,
size,
@@ -89,7 +92,9 @@
memcpy(&((char*)db)[size],
chk,
sizeof(CHK));
- iblocks[level]->size = htonl(size + sizeof(Datastore_Value));
+ iblocks[level]->size = htonl(size +
+ sizeof(CHK) +
+ sizeof(Datastore_Value));
return OK;
}
Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c 2005-02-25 09:49:29 UTC (rev
305)
+++ GNUnet/src/applications/fs/lib/fslib.c 2005-02-25 10:31:59 UTC (rev
306)
@@ -98,9 +98,11 @@
memcpy(&value[1],
&rep[1],
size);
+ printf("FSLIB calls callback!\n");
if (SYSERR == ctx->handles[i]->callback(&query,
value,
ctx->handles[i]->closure)) {
+ printf("FSLIB callback returned SYSERR, nulling!\n");
ctx->handles[i]->callback = NULL;
}
FREE(value);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r306 - in GNUnet/src/applications/fs: ecrs lib,
grothoff <=