diff options
author | Anthony Agresta <aagresta@datainnovations.com> | 2014-11-07 09:32:00 -0500 |
---|---|---|
committer | Anthony Agresta <aagresta@datainnovations.com> | 2014-11-07 09:32:00 -0500 |
commit | 6ddc43c4fc202b96ccff60afa66db81a3ee2f4b7 (patch) | |
tree | 5e4f0137a91df924414f341a0138f0742cd1c7d7 /vnc | |
parent | 605df27103158bcea57ad95aa8d9d06d07479de9 (diff) | |
download | xrdp-proprietary-6ddc43c4fc202b96ccff60afa66db81a3ee2f4b7.tar.gz xrdp-proprietary-6ddc43c4fc202b96ccff60afa66db81a3ee2f4b7.zip |
vnc: Added delay_ms option. Fixes neutrinolabs/xrdp#182
Diffstat (limited to 'vnc')
-rw-r--r-- | vnc/vnc.c | 11 | ||||
-rw-r--r-- | vnc/vnc.h | 1 |
2 files changed, 12 insertions, 0 deletions
@@ -979,6 +979,13 @@ lib_mod_connect(struct vnc *v) v->sck_obj = g_create_wait_obj_from_socket(v->sck, 0); v->sck_closed = 0; + if (v->delay_ms > 0) + { + g_sprintf(text, "Waiting %d ms for VNC to start...", v->delay_ms); + v->server_msg(v, text, 0); + g_sleep(v->delay_ms); + } + g_sprintf(text, "VNC connecting to %s %s", v->ip, con_port); v->server_msg(v, text, 0); error = g_tcp_connect(v->sck, v->ip, con_port); @@ -1331,6 +1338,10 @@ lib_mod_set_param(struct vnc *v, char *name, char *value) { v->keylayout = g_atoi(value); } + else if (g_strcasecmp(name, "delay_ms") == 0) + { + v->delay_ms = g_atoi(value); + } return 0; } @@ -115,4 +115,5 @@ struct vnc char* clip_data; int clip_data_size; tbus sck_obj; + int delay_ms; }; |