Harmonise new client handlers
One was missing a call to register the fd with the X server, and
one forgot to set it to non-blocking. One result of this was a crash
when hitting the blacklist.
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index f6e6a7f..1428791 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -443,6 +443,7 @@
sock->outStream().setBlocking(false);
vlog.debug("new client, sock %d", sock->getFd());
sockserv->addSocket(sock);
+ vncSetNotifyFd(sock->getFd(), screenIndex, true, false);
return true;
}
@@ -536,6 +537,7 @@
void XserverDesktop::addClient(Socket* sock, bool reverse)
{
vlog.debug("new client, sock %d reverse %d",sock->getFd(),reverse);
+ sock->outStream().setBlocking(false);
server->addSocket(sock, reverse);
vncSetNotifyFd(sock->getFd(), screenIndex, true, false);
}