diff options
author | runge <runge@karlrunge.com> | 2009-06-14 19:00:09 -0400 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2009-06-14 19:00:09 -0400 |
commit | d11b2abd8cf4d9afb1257695f8be1125d5625a65 (patch) | |
tree | 70fd354a069604031a4087620b7965574aeaef8a /x11vnc/connections.c | |
parent | 0e7499fb395ddfe95395bcb70836893dc4c00535 (diff) | |
download | libtdevnc-d11b2abd8cf4d9afb1257695f8be1125d5625a65.tar.gz libtdevnc-d11b2abd8cf4d9afb1257695f8be1125d5625a65.zip |
X11VNC_REFLECT_PASSWORD env. var., warning about compiz, improve single-port.
Diffstat (limited to 'x11vnc/connections.c')
-rw-r--r-- | x11vnc/connections.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/x11vnc/connections.c b/x11vnc/connections.c index b0fa11a..8c3e474 100644 --- a/x11vnc/connections.c +++ b/x11vnc/connections.c @@ -817,7 +817,10 @@ void client_gone(rfbClientPtr client) { rfbLog("connect_once: invalid password or early " "disconnect.\n"); rfbLog("connect_once: waiting for next connection.\n"); - accepted_client = 0; + accepted_client--; + if (accepted_client < 0) { + accepted_client = 0; + } CLIENT_UNLOCK; return; } @@ -2995,8 +2998,8 @@ enum rfbNewClientAction new_client(rfbClientPtr client) { if (connect_once) { if (screen->dontDisconnect && screen->neverShared) { if (! shared && accepted_client) { - rfbLog("denying additional client: %s\n", - client->host); + rfbLog("denying additional client: %s:%d\n", + client->host, get_remote_port(client->sock)); CLIENT_UNLOCK; return(RFB_CLIENT_REFUSE); } @@ -3095,7 +3098,8 @@ enum rfbNewClientAction new_client(rfbClientPtr client) { cd->cmp_bytes_sent = 0; cd->raw_bytes_sent = 0; - accepted_client = 1; + rfbLog("incr accepted_client for %s:%d.\n", client->host, get_remote_port(client->sock)); + accepted_client++; last_client = time(NULL); if (ncache) { |