|
|
|
@ -60,6 +60,7 @@ xrdp_listen_create(void)
|
|
|
|
|
g_process_sem = tc_sem_create(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* setting TCP mode now, may change later */
|
|
|
|
|
self->listen_trans = trans_create(TRANS_MODE_TCP, 16, 16);
|
|
|
|
|
|
|
|
|
|
if (self->listen_trans == 0)
|
|
|
|
@ -186,13 +187,19 @@ xrdp_listen_get_port_address(char *port, int port_bytes,
|
|
|
|
|
if (g_strcasecmp(val, "port") == 0)
|
|
|
|
|
{
|
|
|
|
|
val = (char *)list_get_item(values, index);
|
|
|
|
|
if (val[0] == '/')
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(port, val, port_bytes - 1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
error = g_atoi(val);
|
|
|
|
|
|
|
|
|
|
if ((error > 0) && (error < 65000))
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(port, val, port_bytes - 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (g_strcasecmp(val, "address") == 0)
|
|
|
|
|
{
|
|
|
|
@ -348,6 +355,14 @@ xrdp_listen_main_loop(struct xrdp_listen *self)
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (port[0] == '/')
|
|
|
|
|
{
|
|
|
|
|
/* set UDS mode */
|
|
|
|
|
self->listen_trans->mode = TRANS_MODE_UNIX;
|
|
|
|
|
/* not valid with UDS */
|
|
|
|
|
tcp_nodelay = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Create socket */
|
|
|
|
|
error = trans_listen_address(self->listen_trans, port, address);
|
|
|
|
|
|
|
|
|
|