diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-05-30 00:09:55 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-05-30 00:09:55 +0000 |
commit | b37045470834cf349c8bdf31938823809e67bfb5 (patch) | |
tree | 0e0bfc43edd5b6c34d4b9530d439eee30a582e53 | |
parent | 6fa705fbfaffc4f68e171922487ca6a2cd12d15f (diff) | |
download | gnunet-b37045470834cf349c8bdf31938823809e67bfb5.tar.gz gnunet-b37045470834cf349c8bdf31938823809e67bfb5.zip |
- adjust timeout when no more strings are left to be found
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index c38615498..d5a962f6f 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -978,9 +978,17 @@ announce_next_regex (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
978 | { | 978 | { |
979 | struct RegexPeer *peer; | 979 | struct RegexPeer *peer; |
980 | 980 | ||
981 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || | 981 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
982 | next_search >= num_peers) | 982 | return; |
983 | if (next_search >= num_peers) | ||
984 | { | ||
985 | if (GNUNET_SCHEDULER_NO_TASK != search_timeout_task) | ||
986 | GNUNET_SCHEDULER_cancel (search_timeout_task); | ||
987 | search_timeout_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_HOURS, | ||
988 | &search_timed_out, | ||
989 | NULL); | ||
983 | return; | 990 | return; |
991 | } | ||
984 | 992 | ||
985 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Starting daemon %u\n", next_search); | 993 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Starting daemon %u\n", next_search); |
986 | peer = &peers[next_search]; | 994 | peer = &peers[next_search]; |