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)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ struct mod
|
||||
int version; /* internal version */
|
||||
/* client functions */
|
||||
int (*mod_start)(struct mod *v, int w, int h, int bpp);
|
||||
int (*mod_connect)(struct mod *v);
|
||||
int (*mod_connect)(struct mod *v, int fd);
|
||||
int (*mod_event)(struct mod *v, int msg, long param1, long param2,
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod *v);
|
||||
|
||||
Reference in New Issue
Block a user