mirror of https://github.com/neutrinolabs/xrdp
xrdp: support old xrdp.ini port, use_vsock style
This commit is contained in:
parent
216ba3b4d4
commit
d7bd6f726b
|
@ -213,6 +213,12 @@ xrdp_listen_get_startup_params(struct xrdp_listen *self)
|
|||
val = (char *)list_get_item(values, index);
|
||||
startup_params->tcp_recv_buffer_bytes = g_atoi(val);
|
||||
}
|
||||
|
||||
if (g_strcasecmp(val, "use_vsock") == 0)
|
||||
{
|
||||
val = (char *)list_get_item(values, index);
|
||||
startup_params->use_vsock = g_text2bool(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -546,6 +552,23 @@ xrdp_listen_pp(struct xrdp_listen *self, int *index,
|
|||
*index = lindex;
|
||||
return 0;
|
||||
}
|
||||
else if ((str[0] >= '0') && (str[0] <= '9'))
|
||||
{
|
||||
g_strncpy(address, "0.0.0.0", 127);
|
||||
bytes = xrdp_listen_parse_integer(port, 128, str, str_end - str);
|
||||
str += bytes;
|
||||
lindex += bytes;
|
||||
if (startup_params->use_vsock)
|
||||
{
|
||||
*mode = TRANS_MODE_VSOCK;
|
||||
}
|
||||
else
|
||||
{
|
||||
*mode = TRANS_MODE_TCP;
|
||||
}
|
||||
*index = lindex;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
str++;
|
||||
|
|
|
@ -537,6 +537,7 @@ struct xrdp_startup_params
|
|||
int tcp_recv_buffer_bytes;
|
||||
int tcp_nodelay;
|
||||
int tcp_keepalive;
|
||||
int use_vsock;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue