diff options
author | runge <runge> | 2006-09-17 18:08:23 +0000 |
---|---|---|
committer | runge <runge> | 2006-09-17 18:08:23 +0000 |
commit | dba5e098767b71bb017fa191cc3f07dc68437655 (patch) | |
tree | 2cc3de51656fb733b93baaa0b7a02a058801cd3c /x11vnc/connections.c | |
parent | 31d3a9fa8d081c573822fd8b66b9cdf70092c9d2 (diff) | |
download | libtdevnc-dba5e098767b71bb017fa191cc3f07dc68437655.tar.gz libtdevnc-dba5e098767b71bb017fa191cc3f07dc68437655.zip |
x11vnc: -verbose, -connect_or_exit, -rfbport 0, print out SSL cert.
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r-- | x11vnc/connections.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c index 159c884..291cd7b 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -1587,6 +1587,9 @@ static int do_reverse_connect(char *str) { free(host); if (cl == NULL) { + if (quiet && connect_or_exit) { + rfbLogEnable(1); + } rfbLog("reverse_connect: %s failed\n", str); return 0; } else { @@ -1609,6 +1612,7 @@ void reverse_connect(char *str) { int sleep_between_host = 300; int sleep_min = 1500, sleep_max = 4500, n_max = 5; int n, tot, t, dt = 100, cnt = 0; + int nclients0 = client_count; if (unixpw_in_progress) return; @@ -1634,6 +1638,11 @@ void reverse_connect(char *str) { free(tmp); if (cnt == 0) { + if (connect_or_exit) { + rfbLogEnable(1); + rfbLog("exiting under -connect_or_exit\n"); + clean_up_exit(0); + } return; } @@ -1653,9 +1662,23 @@ void reverse_connect(char *str) { t = 0; while (t < tot) { rfbPE(-1); + rfbPE(-1); usleep(dt * 1000); t += dt; } + if (connect_or_exit) { + if (client_count <= nclients0) { + for (t = 0; t < 10; t++) { + rfbPE(-1); + usleep(100 * 1000); + } + } + if (client_count <= nclients0) { + rfbLogEnable(1); + rfbLog("exiting under -connect_or_exit\n"); + clean_up_exit(0); + } + } } /* |