summaryrefslogtreecommitdiffstats
path: root/libvncserver/main.c
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-10-14 18:50:54 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-10-14 18:50:54 +0200
commit68cb29a12f8f2a336088f087cdbc9e0e7aa92ae5 (patch)
treeb1a8739116bd994e85cfa4ac8a275b49678ba00b /libvncserver/main.c
parent27bc3dba7089268b0247e91957fff498a43d08dc (diff)
parent8415ff4c3517c6697d53e1a17bba35284f480891 (diff)
downloadlibtdevnc-68cb29a12f8f2a336088f087cdbc9e0e7aa92ae5.tar.gz
libtdevnc-68cb29a12f8f2a336088f087cdbc9e0e7aa92ae5.zip
Merge tag 'LibVNCServer-0.9.11' of https://github.com/LibVNC/libvncserver
Conflicts: CMakeLists.txt libvncserver/main.c
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r--libvncserver/main.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 7340364..4fbe036 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -579,7 +579,15 @@ clientInput(void *data)
rfbSendFileTransferChunk(cl);
if (FD_ISSET(cl->sock, &rfds) || FD_ISSET(cl->sock, &efds))
+ {
+#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
+ do {
+ rfbProcessClientMessage(cl);
+ } while (webSocketsHasDataInBuffer(cl));
+#else
rfbProcessClientMessage(cl);
+#endif
+ }
}
/* Get rid of the output thread. */
@@ -616,7 +624,7 @@ listenerRun(void *data)
return NULL;
}
- /* TODO: this thread wont die by restarting the server */
+ /* TODO: this thread won't die by restarting the server */
/* TODO: HTTP is not handled */
while (1) {
client_fd = -1;
@@ -662,7 +670,11 @@ rfbStartOnHoldClient(rfbClientPtr cl)
void
rfbStartOnHoldClient(rfbClientPtr cl)
{
- cl->onHold = FALSE;
+ cl->onHold = FALSE;
+#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
+ if(cl->screen->backgroundLoop)
+ pthread_create(&cl->client_thread, NULL, clientInput, (void *)cl);
+#endif
}
#endif
@@ -1310,4 +1322,4 @@ void ClientOutputHandlerObject::run(void) {
TQThread::exit();
}
-#include "main.moc" \ No newline at end of file
+#include "main.moc"