diff options
author | dscho <dscho> | 2005-09-26 13:17:33 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-09-26 13:17:33 +0000 |
commit | da7b3e714f8f9b501cb13075f6433416410bd6aa (patch) | |
tree | 55aa6e98a630b287767a8c01b7ba976025f2ad14 /libvncserver/rfbserver.c | |
parent | 65bb85b9cb066ccbfe3c4b6b33b113e2a60e0abb (diff) | |
download | libtdevnc-da7b3e714f8f9b501cb13075f6433416410bd6aa.tar.gz libtdevnc-da7b3e714f8f9b501cb13075f6433416410bd6aa.zip |
support VNC protocol version 3.7
Diffstat (limited to 'libvncserver/rfbserver.c')
-rw-r--r-- | libvncserver/rfbserver.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 745589e..1f71a18 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -487,6 +487,9 @@ rfbProcessClientMessage(rfbClientPtr cl) case RFB_PROTOCOL_VERSION: rfbProcessClientProtocolVersion(cl); return; + case RFB_SECURITY_TYPE: + rfbProcessClientSecurityType(cl); + return; case RFB_AUTHENTICATION: rfbAuthProcessClientMessage(cl); return; @@ -545,9 +548,17 @@ rfbProcessClientProtocolVersion(rfbClientPtr cl) return; } - if (minor_ != rfbProtocolMinorVersion) { - /* Minor version mismatch - warn but try to continue */ - rfbLog("Ignoring minor version mismatch\n"); + // Chk for the minor version use either of the two standard version of RFB + cl->protocolMinorVersion = minor_; + if (minor_ > rfbProtocolMinorVersion) { + cl->protocolMinorVersion = rfbProtocolMinorVersion; + } else if (minor_ < rfbProtocolMinorVersion) { + cl->protocolMinorVersion = rfbProtocolFallbackMinorVersion; + } + if (minor_ != rfbProtocolMinorVersion && + minor_ != rfbProtocolFallbackMinorVersion) { + rfbLog("Non-standard protocol version %d.%d, using %d.%d instead\n", + major_, minor_, rfbProtocolMajorVersion, cl->protocolMinorVersion); } rfbAuthNewClient(cl); |