aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2008-07-29 19:44:54 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2008-07-29 19:44:54 +0000
commitce91f67f60d1830ffec4eee9198fa29563e0fae1 (patch)
tree738e6e99d1ee4edb74948b88e4895a68831ff719
parent98ba96f1852e78ce14a8434fa431e6db33f97115 (diff)
downloadstrongswan-ce91f67f60d1830ffec4eee9198fa29563e0fae1.tar.bz2
strongswan-ce91f67f60d1830ffec4eee9198fa29563e0fae1.tar.xz
starter now waits for a maximum of 10s instead of 1s for charon before restarting the daemon
-rw-r--r--src/starter/invokecharon.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c
index b637674d0..4a390ded1 100644
--- a/src/starter/invokecharon.c
+++ b/src/starter/invokecharon.c
@@ -177,15 +177,13 @@ starter_start_charon (starter_config_t *cfg, bool no_fork)
default:
/* father */
_charon_pid = pid;
- for (i = 0; i < 50 && _charon_pid; i++)
+ for (i = 0; i < 500 && _charon_pid; i++)
{
- /* wait for charon */
+ /* wait for charon for a maximum of 500 x 20 ms = 10 s */
usleep(20000);
if (stat(CHARON_PID_FILE, &stb) == 0)
{
- DBG(DBG_CONTROL,
- DBG_log("charon (%d) started", _charon_pid)
- )
+ plog("charon (%d) started after %d ms", _charon_pid, 20*(i+1));
return 0;
}
}