diff options
author | Florian Dold <florian.dold@gmail.com> | 2014-02-10 00:30:23 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2014-02-10 00:30:23 +0000 |
commit | 8c669666c7756352e9cb93e48e973e1785bfc43f (patch) | |
tree | 35aec89dd4164b3216244d03b1b6ed7ec0cbe9ed /src/consensus/gnunet-consensus-profiler.c | |
parent | f41fa68561b05a68dbcea690fbd10fda7d0d4460 (diff) | |
download | gnunet-8c669666c7756352e9cb93e48e973e1785bfc43f.tar.gz gnunet-8c669666c7756352e9cb93e48e973e1785bfc43f.zip |
- correct handling of timeouts in consensus
- fixed segfault in secretsharing profiler
Diffstat (limited to 'src/consensus/gnunet-consensus-profiler.c')
-rw-r--r-- | src/consensus/gnunet-consensus-profiler.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index d7a14f68e..ef8e08e08 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c | |||
@@ -37,6 +37,8 @@ static unsigned int num_values = 5; | |||
37 | 37 | ||
38 | static struct GNUNET_TIME_Relative conclude_timeout; | 38 | static struct GNUNET_TIME_Relative conclude_timeout; |
39 | 39 | ||
40 | static struct GNUNET_TIME_Relative consensus_delay; | ||
41 | |||
40 | static struct GNUNET_CONSENSUS_Handle **consensus_handles; | 42 | static struct GNUNET_CONSENSUS_Handle **consensus_handles; |
41 | 43 | ||
42 | static struct GNUNET_TESTBED_Operation **testbed_operations; | 44 | static struct GNUNET_TESTBED_Operation **testbed_operations; |
@@ -408,7 +410,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
408 | return; | 410 | return; |
409 | } | 411 | } |
410 | 412 | ||
411 | start = GNUNET_TIME_absolute_get (); | 413 | start = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), consensus_delay); |
412 | deadline = GNUNET_TIME_absolute_add (start, conclude_timeout); | 414 | deadline = GNUNET_TIME_absolute_add (start, conclude_timeout); |
413 | 415 | ||
414 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 416 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -443,6 +445,9 @@ main (int argc, char **argv) | |||
443 | { 't', "timeout", NULL, | 445 | { 't', "timeout", NULL, |
444 | gettext_noop ("consensus timeout"), | 446 | gettext_noop ("consensus timeout"), |
445 | GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &conclude_timeout }, | 447 | GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &conclude_timeout }, |
448 | { 'd', "delay", NULL, | ||
449 | gettext_noop ("delay until consensus starts"), | ||
450 | GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &consensus_delay }, | ||
446 | { 'V', "verbose", NULL, | 451 | { 'V', "verbose", NULL, |
447 | gettext_noop ("be more verbose (print received values)"), | 452 | gettext_noop ("be more verbose (print received values)"), |
448 | GNUNET_NO, &GNUNET_GETOPT_set_one, &verbose }, | 453 | GNUNET_NO, &GNUNET_GETOPT_set_one, &verbose }, |