diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-05-23 21:57:16 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-05-23 21:57:16 +0400 |
commit | cf27bf49df5243237acb15389fb5544f5a863685 (patch) | |
tree | f136393420aa859067ae0da1ad084a51f0ee93af /accel-pppd/cli | |
parent | de677ffd0e12f966c6d871e1343ccd5c517ad44c (diff) | |
download | accel-ppp-xebd-cf27bf49df5243237acb15389fb5544f5a863685.tar.gz accel-ppp-xebd-cf27bf49df5243237acb15389fb5544f5a863685.zip |
cli: fixed 'restart' command (do soft restart, i.e. terminate sessions by default)
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; |