diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2015-10-10 15:42:29 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2015-10-10 15:42:29 -0700 |
commit | 418637f72d7c72c82b24618799953e64dfcd16c8 (patch) | |
tree | f8071feaeb66a98c69a75cc3f2e33da3f3065f81 | |
parent | fd793bd2130630fad497ee91638befcf194ab3ce (diff) | |
download | xrdp-proprietary-418637f72d7c72c82b24618799953e64dfcd16c8.tar.gz xrdp-proprietary-418637f72d7c72c82b24618799953e64dfcd16c8.zip |
xrdp: fix --kill
-rw-r--r-- | xrdp/xrdp.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index 24953c2d..11577cd6 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -401,39 +401,6 @@ main(int argc, char **argv) g_exit(0); } - /* starting logging subsystem */ - error = log_start(cfg_file, "XRDP"); - - if (error != LOG_STARTUP_OK) - { - switch (error) - { - case LOG_ERROR_MALLOC: - g_writeln("error on malloc. cannot start logging. quitting."); - break; - case LOG_ERROR_FILE_OPEN: - g_writeln("error opening log file [%s]. quitting.", - getLogFile(text, 255)); - break; - default: - g_writeln("log_start error"); - break; - } - - g_deinit(); - g_exit(1); - } - - - - if (g_file_exist(pid_file)) /* xrdp.pid */ - { - g_writeln("It looks like xrdp is allready running,"); - g_writeln("if not delete the xrdp.pid file and try again"); - g_deinit(); - g_exit(0); - } - if (startup_params->kill) { g_writeln("stopping xrdp"); @@ -469,6 +436,39 @@ main(int argc, char **argv) g_exit(0); } + /* starting logging subsystem */ + error = log_start(cfg_file, "XRDP"); + + if (error != LOG_STARTUP_OK) + { + switch (error) + { + case LOG_ERROR_MALLOC: + g_writeln("error on malloc. cannot start logging. quitting."); + break; + case LOG_ERROR_FILE_OPEN: + g_writeln("error opening log file [%s]. quitting.", + getLogFile(text, 255)); + break; + default: + g_writeln("log_start error"); + break; + } + + g_deinit(); + g_exit(1); + } + + + + if (g_file_exist(pid_file)) /* xrdp.pid */ + { + g_writeln("It looks like xrdp is allready running,"); + g_writeln("if not delete the xrdp.pid file and try again"); + g_deinit(); + g_exit(0); + } + if (startup_params->no_daemon) { no_daemon = 1; |