summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2006-02-12 00:17:56 +0000
committerjsorg71 <jsorg71>2006-02-12 00:17:56 +0000
commitcdba972be2ba5ab51987ecef8b53e2956de84ba4 (patch)
tree35290c13e6897d02869096a5515411d2dad3fcea
parent9e1c8b2fc096830e6e8f26e1da7298fffa6432ae (diff)
downloadxrdp-proprietary-cdba972be2ba5ab51987ecef8b53e2956de84ba4.tar.gz
xrdp-proprietary-cdba972be2ba5ab51987ecef8b53e2956de84ba4.zip
more checking to see if the Xserver display is available
-rw-r--r--sesman/session.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sesman/session.c b/sesman/session.c
index 412dc317..f9081b9e 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -83,6 +83,7 @@ x_server_running(int display)
{
char text[256];
int x_running;
+ int sck;
g_sprintf(text, "/tmp/.X11-unix/X%d", display);
x_running = g_file_exist(text);
@@ -91,6 +92,27 @@ x_server_running(int display)
g_sprintf(text, "/tmp/.X%d-lock", display);
x_running = g_file_exist(text);
}
+ if (!x_running) /* check 59xx */
+ {
+ sck = g_tcp_socket();
+ g_sprintf(text, "59%2.2d", display);
+ x_running = g_tcp_bind(sck, text);
+ g_tcp_close(sck);
+ }
+ if (!x_running) /* check 61xx */
+ {
+ sck = g_tcp_socket();
+ g_sprintf(text, "61%2.2d", display);
+ x_running = g_tcp_bind(sck, text);
+ g_tcp_close(sck);
+ }
+ if (!x_running) /* check 62xx */
+ {
+ sck = g_tcp_socket();
+ g_sprintf(text, "62%2.2d", display);
+ x_running = g_tcp_bind(sck, text);
+ g_tcp_close(sck);
+ }
return x_running;
}