[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14797 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14797 - gnunet/src/fs |
Date: |
Thu, 31 Mar 2011 15:21:24 +0200 |
Author: grothoff
Date: 2011-03-31 15:21:24 +0200 (Thu, 31 Mar 2011)
New Revision: 14797
Modified:
gnunet/src/fs/Makefile.am
gnunet/src/fs/fs_download.c
gnunet/src/fs/gnunet-service-fs_cp.c
gnunet/src/fs/gnunet-service-fs_pe.c
gnunet/src/fs/gnunet-service-fs_push.c
Log:
fixes
Modified: gnunet/src/fs/Makefile.am
===================================================================
--- gnunet/src/fs/Makefile.am 2011-03-31 12:53:51 UTC (rev 14796)
+++ gnunet/src/fs/Makefile.am 2011-03-31 13:21:24 UTC (rev 14797)
@@ -217,6 +217,7 @@
test_fs_directory_SOURCES = \
test_fs_directory.c
test_fs_directory_LDADD = \
+ -lextractor \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
@@ -241,6 +242,7 @@
test_fs_file_information_SOURCES = \
test_fs_file_information.c
test_fs_file_information_LDADD = \
+ -lextractor \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
@@ -342,6 +344,7 @@
perf_gnunet_service_fs_p2p.c
perf_gnunet_service_fs_p2p_LDADD = \
$(top_builddir)/src/fs/libgnunetfstest.a \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
@@ -350,6 +353,7 @@
perf_gnunet_service_fs_p2p.c
perf_gnunet_service_fs_p2p_index_LDADD = \
$(top_builddir)/src/fs/libgnunetfstest.a \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
@@ -358,6 +362,7 @@
perf_gnunet_service_fs_p2p.c
perf_gnunet_service_fs_p2p_dht_LDADD = \
$(top_builddir)/src/fs/libgnunetfstest.a \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
@@ -366,6 +371,7 @@
perf_gnunet_service_fs_p2p_trust.c
perf_gnunet_service_fs_p2p_trust_LDADD = \
$(top_builddir)/src/fs/libgnunetfstest.a \
+ $(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/fs/libgnunetfs.la \
$(top_builddir)/src/util/libgnunetutil.la
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2011-03-31 12:53:51 UTC (rev 14796)
+++ gnunet/src/fs/fs_download.c 2011-03-31 13:21:24 UTC (rev 14797)
@@ -98,38 +98,6 @@
/**
- * Given a block at the given offset and depth, calculate the offset
- * for the CHK at the given index.
- *
- * @param offset the offset of the first
- * DBLOCK in the subtree of the
- * identified IBLOCK
- * @param depth the depth of the IBLOCK in the tree, 0 for DBLOCK
- * @param k which CHK in the IBLOCK are we
- * talking about
- * @return offset if k=0, otherwise an appropriately
- * larger value (i.e., if depth = 1,
- * the returned value should be offset+k*DBLOCK_SIZE)
- */
-static uint64_t
-compute_dblock_offset (uint64_t offset,
- unsigned int depth,
- unsigned int k)
-{
- unsigned int i;
- uint64_t lsize; /* what is the size of the sum of all DBlocks
- that a CHK at depth i corresponds to? */
-
- if (depth == 0)
- return offset;
- lsize = DBLOCK_SIZE;
- for (i=1;i<depth;i++)
- lsize *= CHK_PER_INODE;
- return offset + k * lsize;
-}
-
-
-/**
* Fill in all of the generic fields for a download event and call the
* callback.
*
@@ -1277,9 +1245,6 @@
chk = (struct ContentHashKey*) pt;
for (i=(prc->size / sizeof(struct ContentHashKey))-1;i>=0;i--)
{
- off = compute_dblock_offset (dr->offset,
- dr->depth,
- i);
drc = dr->children[i];
switch (drc->state)
{
Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c 2011-03-31 12:53:51 UTC (rev
14796)
+++ gnunet/src/fs/gnunet-service-fs_cp.c 2011-03-31 13:21:24 UTC (rev
14797)
@@ -939,6 +939,18 @@
(unsigned int) bm);
#endif
namespace = (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE)) ? &opt[bits++] :
NULL;
+ if ( (type == GNUNET_BLOCK_TYPE_FS_SBLOCK) &&
+ (namespace == NULL) )
+ {
+ GNUNET_break_op (0);
+ return NULL;
+ }
+ if ( (type != GNUNET_BLOCK_TYPE_FS_SBLOCK) &&
+ (namespace != NULL) )
+ {
+ GNUNET_break_op (0);
+ return NULL;
+ }
target = (0 != (bm & GET_MESSAGE_BIT_TRANSMIT_TO)) ? ((const struct
GNUNET_PeerIdentity*) &opt[bits++]) : NULL;
options = 0;
spid = 0;
Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c 2011-03-31 12:53:51 UTC (rev
14796)
+++ gnunet/src/fs/gnunet-service-fs_pe.c 2011-03-31 13:21:24 UTC (rev
14797)
@@ -217,7 +217,6 @@
{
struct PeerPlan *pp = cls;
struct GSF_RequestPlan *rp;
- struct GSF_PendingRequestData *prd;
size_t msize;
pp->task = GNUNET_SCHEDULER_NO_TASK;
@@ -226,12 +225,10 @@
while ( (NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
(GNUNET_TIME_absolute_get_remaining
(rp->earliest_transmission).rel_value == 0) )
{
- rp = GNUNET_CONTAINER_heap_remove_root (pp->delay_heap);
+ GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap,
rp,
rp->priority);
- if (NULL == (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap)))
- break;
}
if (0 == GNUNET_CONTAINER_heap_get_size (pp->priority_heap))
{
@@ -247,7 +244,6 @@
/* process from priority heap */
rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap);
GNUNET_assert (NULL != rp);
- prd = GSF_pending_request_get_data_ (rp->pr);
msize = GSF_pending_request_get_message_ (rp->pr, 0, NULL);
pp->pth = GSF_peer_transmit_ (pp->cp,
GNUNET_YES,
Modified: gnunet/src/fs/gnunet-service-fs_push.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.c 2011-03-31 12:53:51 UTC (rev
14796)
+++ gnunet/src/fs/gnunet-service-fs_push.c 2011-03-31 13:21:24 UTC (rev
14797)
@@ -404,7 +404,6 @@
/* failed to find migration target AND
queue is full, purge most-forwarded
block from queue to make room for more */
- score = 0;
pos = mig_head;
while (NULL != pos)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14797 - gnunet/src/fs,
gnunet <=