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
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
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
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
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
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
}
-/**
- * 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.
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)
{
(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;
{
struct PeerPlan *pp = cls;
struct GSF_RequestPlan *rp;
- struct GSF_PendingRequestData *prd;
size_t msize;
pp->task = GNUNET_SCHEDULER_NO_TASK;
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))
{
/* 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,
/* 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)
{