diff options
| author | Jay Sorg <jay.sorg@gmail.com> | 2013-08-24 17:57:00 -0700 |
|---|---|---|
| committer | Jay Sorg <jay.sorg@gmail.com> | 2013-08-24 17:57:00 -0700 |
| commit | 069838f3557f584932a6372a72b3ad0155fcc761 (patch) | |
| tree | b8af085fd691d2031ccb8924a4089d906b967f4c | |
| parent | 1fb8fd9b974aebfec718eea2bbd89c000c7ae350 (diff) | |
| download | xrdp-proprietary-069838f3557f584932a6372a72b3ad0155fcc761.tar.gz xrdp-proprietary-069838f3557f584932a6372a72b3ad0155fcc761.zip | |
hook up the kill disconnect timeout to the sesman config file
| -rw-r--r-- | sesman/session.c | 7 | ||||
| -rw-r--r-- | xorg/X11R7.6/rdp/rdpup.c | 23 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sesman/session.c b/sesman/session.c index 888604da..c21ecb6a 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -559,6 +559,13 @@ session_start_fork(int width, int height, int bpp, char *username, env_set_user(username, passwd_file, display); env_check_password_file(passwd_file, password); + g_snprintf(text, 255, "%d", g_cfg->sess.max_idle_time); + g_setenv("XRDP_SESMAN_MAX_IDLE_TIME", text, 1); + g_snprintf(text, 255, "%d", g_cfg->sess.max_disc_time); + g_setenv("XRDP_SESMAN_MAX_DISC_TIME", text, 1); + g_snprintf(text, 255, "%d", g_cfg->sess.kill_disconnected); + g_setenv("XRDP_SESMAN_KILL_DISCONNECTED", text, 1); + if (type == SESMAN_SESSION_TYPE_XVNC) { xserver_params = list_create(); diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c index 765269e4..325ee492 100644 --- a/xorg/X11R7.6/rdp/rdpup.c +++ b/xorg/X11R7.6/rdp/rdpup.c @@ -971,6 +971,7 @@ int rdpup_init(void) { char text[256]; + char *ptext; int i; if (!g_directory_exist("/tmp/.xrdp")) @@ -1055,6 +1056,28 @@ rdpup_init(void) } } + ptext = getenv("XRDP_SESMAN_MAX_IDLE_TIME"); + if (ptext != 0) + { + } + ptext = getenv("XRDP_SESMAN_MAX_DISC_TIME"); + if (ptext != 0) + { + g_disconnect_timeout = atoi(ptext); + } + ptext = getenv("XRDP_SESMAN_KILL_DISCONNECTED"); + if (ptext != 0) + { + g_do_kill_disconnected = atoi(ptext); + } + + if (g_disconnect_timeout == 0) + { + g_do_kill_disconnected = 0; + } + rdpLog("kill disconencted [%d] timeout [%d]\n", g_do_kill_disconnected, + g_disconnect_timeout); + return 1; } |
