Report pid and listening address/port for xrdp and xrdp-sesman
For xrdp-sesman, don't report that the daemon is listening to a port if it fails to attach to that port. Don't use LOG_LEVEL_ALWAYS for startup message, it's not a critical error.
This commit is contained in:
parent
a77ae440a7
commit
be1d034f91
@ -49,9 +49,6 @@ sesman_main_loop(void)
|
|||||||
tbus sck_obj;
|
tbus sck_obj;
|
||||||
tbus robjs[8];
|
tbus robjs[8];
|
||||||
|
|
||||||
/*main program loop*/
|
|
||||||
log_message(LOG_LEVEL_INFO, "listening...");
|
|
||||||
|
|
||||||
g_sck = g_tcp_socket();
|
g_sck = g_tcp_socket();
|
||||||
if (g_sck < 0)
|
if (g_sck < 0)
|
||||||
{
|
{
|
||||||
@ -68,6 +65,8 @@ sesman_main_loop(void)
|
|||||||
|
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
{
|
{
|
||||||
|
log_message(LOG_LEVEL_INFO, "listening to port %s on %s",
|
||||||
|
g_cfg->listen_port, g_cfg->listen_address);
|
||||||
sck_obj = g_create_wait_obj_from_socket(g_sck, 0);
|
sck_obj = g_create_wait_obj_from_socket(g_sck, 0);
|
||||||
cont = 1;
|
cont = 1;
|
||||||
|
|
||||||
@ -359,8 +358,8 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* start program main loop */
|
/* start program main loop */
|
||||||
log_message(LOG_LEVEL_ALWAYS,
|
log_message(LOG_LEVEL_INFO,
|
||||||
"starting sesman with pid %d", g_pid);
|
"starting xrdp-sesman with pid %d", g_pid);
|
||||||
|
|
||||||
/* make sure the /tmp/.X11-unix directory exist */
|
/* make sure the /tmp/.X11-unix directory exist */
|
||||||
if (!g_directory_exist("/tmp/.X11-unix"))
|
if (!g_directory_exist("/tmp/.X11-unix"))
|
||||||
|
@ -597,6 +597,7 @@ main(int argc, char **argv)
|
|||||||
g_sync_mutex = tc_mutex_create();
|
g_sync_mutex = tc_mutex_create();
|
||||||
g_sync1_mutex = tc_mutex_create();
|
g_sync1_mutex = tc_mutex_create();
|
||||||
pid = g_getpid();
|
pid = g_getpid();
|
||||||
|
log_message(LOG_LEVEL_INFO, "starting xrdp with pid %d", pid);
|
||||||
g_snprintf(text, 255, "xrdp_%8.8x_main_term", pid);
|
g_snprintf(text, 255, "xrdp_%8.8x_main_term", pid);
|
||||||
g_term_event = g_create_wait_obj(text);
|
g_term_event = g_create_wait_obj(text);
|
||||||
|
|
||||||
|
@ -370,6 +370,8 @@ xrdp_listen_main_loop(struct xrdp_listen *self)
|
|||||||
|
|
||||||
if (error == 0)
|
if (error == 0)
|
||||||
{
|
{
|
||||||
|
log_message(LOG_LEVEL_INFO, "listening to port %s on %s",
|
||||||
|
port, address);
|
||||||
if (tcp_nodelay)
|
if (tcp_nodelay)
|
||||||
{
|
{
|
||||||
if (g_tcp_set_no_delay(self->listen_trans->sck))
|
if (g_tcp_set_no_delay(self->listen_trans->sck))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user