|
|
|
@ -217,6 +217,18 @@ xrdp_listen_get_port_address(char *port, int port_bytes,
|
|
|
|
|
val = (char *)list_get_item(values, index);
|
|
|
|
|
*tcp_keepalive = g_text2bool(val);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (g_strcasecmp(val, "tcp_send_buffer_bytes") == 0)
|
|
|
|
|
{
|
|
|
|
|
val = (char *)list_get_item(values, index);
|
|
|
|
|
startup_param->send_buffer_bytes = g_atoi(val);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (g_strcasecmp(val, "tcp_recv_buffer_bytes") == 0)
|
|
|
|
|
{
|
|
|
|
|
val = (char *)list_get_item(values, index);
|
|
|
|
|
startup_param->recv_buffer_bytes = g_atoi(val);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -322,6 +334,7 @@ xrdp_listen_main_loop(struct xrdp_listen *self)
|
|
|
|
|
tbus done_obj;
|
|
|
|
|
int tcp_nodelay;
|
|
|
|
|
int tcp_keepalive;
|
|
|
|
|
int bytes;
|
|
|
|
|
|
|
|
|
|
self->status = 1;
|
|
|
|
|
|
|
|
|
@ -356,6 +369,54 @@ xrdp_listen_main_loop(struct xrdp_listen *self)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self->startup_params->send_buffer_bytes > 0)
|
|
|
|
|
{
|
|
|
|
|
bytes = self->startup_params->send_buffer_bytes;
|
|
|
|
|
log_message(LOG_LEVEL_INFO, "setting send buffer to %d bytes",
|
|
|
|
|
bytes);
|
|
|
|
|
if (g_sck_set_send_buffer_bytes(self->listen_trans->sck,
|
|
|
|
|
bytes) != 0)
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_ERROR, "error setting send buffer");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (g_sck_get_send_buffer_bytes(self->listen_trans->sck,
|
|
|
|
|
&bytes) != 0)
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_ERROR, "error getting send buffer");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_INFO, "send buffer set to %d bytes", bytes);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (self->startup_params->recv_buffer_bytes > 0)
|
|
|
|
|
{
|
|
|
|
|
bytes = self->startup_params->recv_buffer_bytes;
|
|
|
|
|
log_message(LOG_LEVEL_INFO, "setting recv buffer to %d bytes",
|
|
|
|
|
bytes);
|
|
|
|
|
if (g_sck_set_recv_buffer_bytes(self->listen_trans->sck,
|
|
|
|
|
bytes) != 0)
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_ERROR, "error setting recv buffer");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (g_sck_get_recv_buffer_bytes(self->listen_trans->sck,
|
|
|
|
|
&bytes) != 0)
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_ERROR, "error getting recv buffer");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
log_message(LOG_LEVEL_INFO, "recv buffer set to %d bytes", bytes);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self->listen_trans->trans_conn_in = xrdp_listen_conn_in;
|
|
|
|
|
self->listen_trans->callback_data = self;
|
|
|
|
|
term_obj = g_get_term_event(); /*Global termination event */
|
|
|
|
|