From 7585facf05d927eb6df3929ce09ed5e60d905437 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Thu, 7 Feb 2013 13:27:27 +0100 Subject: Imported Upstream version 5.0.2 --- src/starter/starter.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/starter/starter.c') diff --git a/src/starter/starter.c b/src/starter/starter.c index c6efcb2f4..ae6863fd7 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "confread.h" #include "files.h" @@ -328,7 +328,8 @@ static bool check_pid(char *pid_file) static void usage(char *name) { fprintf(stderr, "Usage: starter [--nofork] [--auto-update ]\n" - " [--debug|--debug-more|--debug-all|--nolog]\n"); + " [--debug|--debug-more|--debug-all|--nolog]\n" + " [--attach-gdb]\n"); exit(LSB_RC_INVALID_ARGUMENT); } @@ -594,6 +595,10 @@ int main (int argc, char **argv) { if (starter_charon_pid()) { + if (conn->startup == STARTUP_ROUTE) + { + starter_stroke_unroute_conn(conn); + } starter_stroke_del_conn(conn); } conn->state = STATE_TO_ADD; @@ -622,7 +627,7 @@ int main (int argc, char **argv) DBG2(DBG_APP, "Reloading config..."); new_cfg = confread_load(CONFIG_FILE); - if (new_cfg && (new_cfg->err + new_cfg->non_fatal_err == 0)) + if (new_cfg && (new_cfg->err == 0)) { /* Switch to new config. New conn will be loaded below */ @@ -651,6 +656,10 @@ int main (int argc, char **argv) { if (starter_charon_pid()) { + if (conn->startup == STARTUP_ROUTE) + { + starter_stroke_unroute_conn(conn); + } starter_stroke_del_conn(conn); } } -- cgit v1.2.3