mirror of https://github.com/neutrinolabs/xrdp
sesman: fix for sesman startup without startup script
This commit is contained in:
parent
1e4b03eb3c
commit
351c92dfba
|
@ -51,16 +51,6 @@ config_read(struct config_sesman *cfg)
|
|||
|
||||
if (-1 == fd)
|
||||
{
|
||||
//if (g_cfg->log.fd >= 0)
|
||||
//{
|
||||
/* logging is already active */
|
||||
log_message(LOG_LEVEL_ALWAYS, "error opening %s in \
|
||||
config_read", cfg_file);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
g_printf("error opening %s in config_read", cfg_file);
|
||||
//}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -212,15 +202,6 @@ config_read_globals(int file, struct config_sesman *cf, struct list *param_n,
|
|||
g_free(buf);
|
||||
}
|
||||
|
||||
log_message(LOG_LEVEL_TRACE, "config loaded in %s at %s:%d", __func__, __FILE__, __LINE__);
|
||||
log_message(LOG_LEVEL_TRACE, " listen_address = %s", cf->listen_address);
|
||||
log_message(LOG_LEVEL_TRACE, " listen_port = %s", cf->listen_port);
|
||||
log_message(LOG_LEVEL_TRACE, " enable_user_wm = %d", cf->enable_user_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " default_wm = %s", cf->default_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " user_wm = %s", cf->user_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " reconnect_sh = %s", cf->reconnect_sh);
|
||||
log_message(LOG_LEVEL_TRACE, " auth_file_path = %s", cf->auth_file_path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,12 +342,33 @@ main(int argc, char **argv)
|
|||
g_exit(1);
|
||||
}
|
||||
|
||||
log_message(LOG_LEVEL_TRACE, "config loaded in %s at %s:%d", __func__, __FILE__, __LINE__);
|
||||
log_message(LOG_LEVEL_TRACE, " listen_address = %s", g_cfg->listen_address);
|
||||
log_message(LOG_LEVEL_TRACE, " listen_port = %s", g_cfg->listen_port);
|
||||
log_message(LOG_LEVEL_TRACE, " enable_user_wm = %d", g_cfg->enable_user_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " default_wm = %s", g_cfg->default_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " user_wm = %s", g_cfg->user_wm);
|
||||
log_message(LOG_LEVEL_TRACE, " reconnect_sh = %s", g_cfg->reconnect_sh);
|
||||
log_message(LOG_LEVEL_TRACE, " auth_file_path = %s", g_cfg->auth_file_path);
|
||||
|
||||
if (daemon)
|
||||
{
|
||||
/* not to spit on the console, shut up stdout/stderr before anything's logged */
|
||||
g_file_close(0);
|
||||
g_file_close(1);
|
||||
g_file_close(2);
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* libscp initialization */
|
||||
|
@ -372,17 +393,6 @@ main(int argc, char **argv)
|
|||
g_exit(0);
|
||||
}
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
|
||||
if (g_file_open("/dev/null") < 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/* signal handling */
|
||||
|
|
Loading…
Reference in New Issue