diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2013-06-04 15:37:57 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-06-04 15:37:57 +0400 |
commit | 45156b684e0bd404215183d1368ad8694f29075e (patch) | |
tree | 28b2cb7abdebf9f1763968ddf0820647b894b2b2 /accel-pppd/cli | |
parent | b267b9c39ed7177b466db6c8b5b3f8c3dc6d7758 (diff) | |
parent | cf27bf49df5243237acb15389fb5544f5a863685 (diff) | |
download | accel-ppp-xebd-45156b684e0bd404215183d1368ad8694f29075e.tar.gz accel-ppp-xebd-45156b684e0bd404215183d1368ad8694f29075e.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r-- | accel-pppd/cli/std_cmd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/accel-pppd/cli/std_cmd.c b/accel-pppd/cli/std_cmd.c index 7a890d1..38198a2 100644 --- a/accel-pppd/cli/std_cmd.c +++ b/accel-pppd/cli/std_cmd.c @@ -343,13 +343,17 @@ static void reload_help(char * const *fields, int fields_cnt, void *client) static void __do_restart(void) { +#ifdef USE_BACKUP core_restart(0); +#else + core_restart(1); +#endif _exit(0); } static int restart_exec(const char *cmd, char * const *f, int f_cnt, void *cli) { - int hard; + int hard = 0; if (f_cnt == 2) { if (strcmp(f[1], "soft") == 0) @@ -365,16 +369,12 @@ static int restart_exec(const char *cmd, char * const *f, int f_cnt, void *cli) else return CLI_CMD_SYNTAX; -#ifndef USE_BACKUP - hard = 1; -#endif - if (hard) { - ap_shutdown_soft(__do_restart); - terminate_all_sessions(0); - } else { core_restart(1); _exit(0); + } else { + ap_shutdown_soft(__do_restart); + terminate_all_sessions(0); } return CLI_CMD_OK; |