diff options
author | Christian Beier <dontmind@freeshell.org> | 2015-01-16 17:01:54 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2015-01-16 17:01:54 +0100 |
commit | b568db93b9f27877deec89c5bc434c71bb30a16d (patch) | |
tree | 7e8133814fb0b01f90868a532d6a0e4a01e1c806 | |
parent | 396a3464b94760feb37c3cb173646a581281fd01 (diff) | |
parent | a48035a1ce6b5fa9738e9f1762294ddfe52b8d57 (diff) | |
download | libtdevnc-b568db93b9f27877deec89c5bc434c71bb30a16d.tar.gz libtdevnc-b568db93b9f27877deec89c5bc434c71bb30a16d.zip |
Merge pull request #56 from maxnet/master
Only advertise xvp support when xvpHook is set
-rw-r--r-- | libvncserver/rfbserver.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index cab0018..34e1c06 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -955,7 +955,6 @@ rfbSendSupportedMessages(rfbClientPtr cl) /*rfbSetBit(msgs.client2server, rfbSetSW); */ /*rfbSetBit(msgs.client2server, rfbTextChat); */ rfbSetBit(msgs.client2server, rfbPalmVNCSetScaleFactor); - rfbSetBit(msgs.client2server, rfbXvp); rfbSetBit(msgs.server2client, rfbFramebufferUpdate); rfbSetBit(msgs.server2client, rfbSetColourMapEntries); @@ -963,7 +962,11 @@ rfbSendSupportedMessages(rfbClientPtr cl) rfbSetBit(msgs.server2client, rfbServerCutText); rfbSetBit(msgs.server2client, rfbResizeFrameBuffer); rfbSetBit(msgs.server2client, rfbPalmVNCReSizeFrameBuffer); - rfbSetBit(msgs.server2client, rfbXvp); + + if (cl->screen->xvpHook) { + rfbSetBit(msgs.client2server, rfbXvp); + rfbSetBit(msgs.server2client, rfbXvp); + } memcpy(&cl->updateBuf[cl->ublen], (char *)&msgs, sz_rfbSupportedMessages); cl->ublen += sz_rfbSupportedMessages; @@ -2216,13 +2219,15 @@ rfbProcessClientNormalMessage(rfbClientPtr cl) cl->enableServerIdentity = TRUE; } break; - case rfbEncodingXvp: - rfbLog("Enabling Xvp protocol extension for client " - "%s\n", cl->host); - if (!rfbSendXvp(cl, 1, rfbXvp_Init)) { - rfbCloseClient(cl); - return; - } + case rfbEncodingXvp: + if (cl->screen->xvpHook) { + rfbLog("Enabling Xvp protocol extension for client " + "%s\n", cl->host); + if (!rfbSendXvp(cl, 1, rfbXvp_Init)) { + rfbCloseClient(cl); + return; + } + } break; default: #if defined(LIBVNCSERVER_HAVE_LIBZ) || defined(LIBVNCSERVER_HAVE_LIBPNG) |