diff options
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r-- | libvncserver/main.c | 18 |
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" |