[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6197 - GNUnet/src/applications/fs/gap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6197 - GNUnet/src/applications/fs/gap |
Date: |
Thu, 7 Feb 2008 23:06:02 -0700 (MST) |
Author: grothoff
Date: 2008-02-07 23:06:01 -0700 (Thu, 07 Feb 2008)
New Revision: 6197
Modified:
GNUnet/src/applications/fs/gap/fs.c
GNUnet/src/applications/fs/gap/ondemand.c
Log:
fix
Modified: GNUnet/src/applications/fs/gap/fs.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs.c 2008-02-08 06:05:58 UTC (rev 6196)
+++ GNUnet/src/applications/fs/gap/fs.c 2008-02-08 06:06:01 UTC (rev 6197)
@@ -387,6 +387,7 @@
unsigned int size;
GNUNET_DatastoreValue *enc;
const GNUNET_DatastoreValue *use;
+ unsigned int type;
size = ntohl (value->size) - sizeof (GNUNET_DatastoreValue);
dblock = (const DBlock *) &value[1];
@@ -409,8 +410,9 @@
memcpy (&msg[1], dblock, size);
GNUNET_free_non_null (enc);
coreAPI->cs_send_to_client (sock, &msg->header, GNUNET_YES);
+ type = ntohl (dblock->type);
GNUNET_free (msg);
- if (ntohl (dblock->type) == GNUNET_ECRS_BLOCKTYPE_DATA)
+ if (type == GNUNET_ECRS_BLOCKTYPE_DATA)
return GNUNET_SYSERR; /* unique response */
return GNUNET_OK;
}
@@ -440,10 +442,19 @@
rs = (const CS_fs_request_search_MESSAGE *) req;
type = ntohl (rs->type);
/* try "fast path" avoiding gap/dht if unique reply is locally available */
- if ( (1 == datastore->get (&rs->query[0],
- type, &fast_path_processor, sock)) &&
- (type == GNUNET_ECRS_BLOCKTYPE_DATA) )
- return GNUNET_OK;
+ if (type == GNUNET_ECRS_BLOCKTYPE_DATA)
+ {
+ if ( (1 == datastore->get (&rs->query[0],
+ type, &fast_path_processor, sock)) ||
+ (1 == datastore->get (&rs->query[0],
+ GNUNET_ECRS_BLOCKTYPE_ONDEMAND,
+ &fast_path_processor, sock)) )
+ return GNUNET_OK;
+ }
+ else
+ datastore->get (&rs->query[0],
+ type, &fast_path_processor, sock);
+
anonymityLevel = ntohl (rs->anonymityLevel);
keyCount =
1 + (ntohs (req->size) -
Modified: GNUnet/src/applications/fs/gap/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/gap/ondemand.c 2008-02-08 06:05:58 UTC (rev
6196)
+++ GNUnet/src/applications/fs/gap/ondemand.c 2008-02-08 06:06:01 UTC (rev
6197)
@@ -221,11 +221,9 @@
GNUNET_GE_ERROR | GNUNET_GE_ADMIN |
GNUNET_GE_USER | GNUNET_GE_BULK, "symlink",
serverFN);
- GNUNET_GE_free_context (ectx);
GNUNET_free (serverFN);
return GNUNET_NO;
}
- GNUNET_GE_free_context (ectx);
GNUNET_free (serverFN);
remove_unavailable_mark (fileId);
return GNUNET_YES;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6197 - GNUnet/src/applications/fs/gap,
gnunet <=