aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter/starter.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-04-14 10:34:24 +0000
committerMartin Willi <martin@strongswan.org>2009-04-14 10:34:24 +0000
commita44bb9345f0482b3dace19a27ee40320ddadc75f (patch)
tree34d75bd95b2868900213e13c31ddd892d2fd4904 /src/starter/starter.c
parent6e5c8d9413234b18a0631cddadd973a9f509708b (diff)
downloadstrongswan-a44bb9345f0482b3dace19a27ee40320ddadc75f.tar.bz2
strongswan-a44bb9345f0482b3dace19a27ee40320ddadc75f.tar.xz
merged multi-auth branch back into trunk
Diffstat (limited to 'src/starter/starter.c')
-rw-r--r--src/starter/starter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/starter/starter.c b/src/starter/starter.c
index de8567583..a299d5671 100644
--- a/src/starter/starter.c
+++ b/src/starter/starter.c
@@ -224,6 +224,7 @@ int main (int argc, char **argv)
unsigned long auto_update = 0;
time_t last_reload;
bool no_fork = FALSE;
+ bool attach_gdb = FALSE;
/* global variables defined in log.h */
log_to_stderr = TRUE;
@@ -248,6 +249,11 @@ int main (int argc, char **argv)
{
no_fork = TRUE;
}
+ else if (streq(argv[i], "--attach-gdb"))
+ {
+ no_fork = TRUE;
+ attach_gdb = TRUE;
+ }
else if (streq(argv[i], "--auto-update") && i+1 < argc)
{
auto_update = atoi(argv[++i]);
@@ -571,7 +577,7 @@ int main (int argc, char **argv)
DBG_log("Attempting to start pluto...")
);
- if (starter_start_pluto(cfg, no_fork) == 0)
+ if (starter_start_pluto(cfg, no_fork, attach_gdb) == 0)
{
starter_whack_listen();
}
@@ -606,7 +612,7 @@ int main (int argc, char **argv)
DBG(DBG_CONTROL,
DBG_log("Attempting to start charon...")
);
- if (starter_start_charon(cfg, no_fork))
+ if (starter_start_charon(cfg, no_fork, attach_gdb))
{
/* schedule next try */
alarm(PLUTO_RESTART_DELAY);