From 1820c8cd5075a78f1766be607f938f7a77d61e00 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 9 Jul 2010 12:24:18 +0000 Subject: [PATCH] fix --- src/core/test_core_api_peer1.conf | 1 + src/core/test_core_api_reliability.c | 16 ++++++++-------- src/fs/fs_publish.c | 9 ++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/core/test_core_api_peer1.conf b/src/core/test_core_api_peer1.conf index eaab53936..2aef1811c 100644 --- a/src/core/test_core_api_peer1.conf +++ b/src/core/test_core_api_peer1.conf @@ -44,6 +44,7 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock PORT = 12470 UNIXPATH = /tmp/gnunet-p1-service-core.sock #PREFIX = valgrind --tool=memcheck +#PREFIX = valgrind --tool=callgrind #OPTIONS = -l log-core-1 #PREFIX = xterm -e xterm -T core1 -e gdb --args #PREFIX = xterm -T core1 -e diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index c2375620a..e8e1ad0f6 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c @@ -39,10 +39,17 @@ #define START_ARM GNUNET_YES +/** + * Note that this value must not significantly exceed + * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise + * messages may be dropped even for a reliable transport. + */ +#define TOTAL_MSGS (600 * 200) + /** * How long until we give up on transmitting the message? */ -#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) +#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 6000) /** * What delay do we request from the core service for transmission? @@ -58,13 +65,6 @@ static unsigned long long total_bytes; static struct GNUNET_TIME_Absolute start_time; -/** - * Note that this value must not significantly exceed - * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise - * messages may be dropped even for a reliable transport. - */ -#define TOTAL_MSGS (600 * 2) - struct PeerContext { struct GNUNET_CONFIGURATION_Handle *cfg; diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index e44514ea4..2a0778b34 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -279,7 +279,7 @@ publish_sblocks_cont (void *cls, pc->qre = GNUNET_DATASTORE_release_reserve (pc->dsh, pc->rid, UINT_MAX, - UNIT_MAX, + UINT_MAX, GNUNET_TIME_UNIT_FOREVER_REL, &finish_release_reserve, pc); @@ -1165,7 +1165,6 @@ finish_reserve (void *cls, const char *msg) { struct GNUNET_FS_PublishContext *pc = cls; - struct GNUNET_FS_ProgressInfo pi; pc->qre = NULL; if ( (msg != NULL) || @@ -1180,11 +1179,11 @@ finish_reserve (void *cls, return; } pc->rid = success; - ret->upload_task - = GNUNET_SCHEDULER_add_with_priority (h->sched, + pc->upload_task + = GNUNET_SCHEDULER_add_with_priority (pc->h->sched, GNUNET_SCHEDULER_PRIORITY_BACKGROUND, &GNUNET_FS_publish_main_, - ret); + pc); } -- 2.25.1