Add optional fd parameter to mod_connect() method
The fd parameter can be used to immediately connect to a display server, if an fd was obtained from sesman
This commit is contained in:
@@ -182,15 +182,25 @@ set_keyboard_overrides(struct mod *mod)
|
||||
}
|
||||
|
||||
static int
|
||||
lxrdp_connect(struct mod *mod)
|
||||
lxrdp_connect(struct mod *mod, int fd)
|
||||
{
|
||||
boolean ok;
|
||||
set_keyboard_overrides(mod);
|
||||
|
||||
LOG_DEVEL(LOG_LEVEL_TRACE, "lxrdp_connect:");
|
||||
|
||||
ok = freerdp_connect(mod->inst);
|
||||
LOG_DEVEL(LOG_LEVEL_INFO, "lxrdp_connect: freerdp_connect returned %d", ok);
|
||||
if (fd >= 0)
|
||||
{
|
||||
LOG(LOG_LEVEL_ERROR,
|
||||
"NeutrinoRDP : Can't connect to a file descriptor");
|
||||
ok = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = freerdp_connect(mod->inst);
|
||||
LOG_DEVEL(LOG_LEVEL_INFO,
|
||||
"lxrdp_connect: freerdp_connect returned %d", ok);
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user