diff options
author | Adam Tkac <atkac@redhat.com> | 2011-02-21 13:40:33 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2011-02-21 13:40:33 +0000 |
commit | ccb92454bf1984eea9451081232de90fa5dd7564 (patch) | |
tree | 253356936b5432dc0e18258d80657a3369fb4b66 /common/rfb | |
parent | 674bf066980a0d84612270ba6296bae84f2a0596 (diff) | |
download | tigervnc-ccb92454bf1984eea9451081232de90fa5dd7564.tar.gz tigervnc-ccb92454bf1984eea9451081232de90fa5dd7564.zip |
[Bugfix] Improve r4300 - also honor server's sectype order for VeNCrypt subtypes.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4302 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb')
-rw-r--r-- | common/rfb/CSecurityVeNCrypt.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx index 9c2cebaf..77eeef9a 100644 --- a/common/rfb/CSecurityVeNCrypt.cxx +++ b/common/rfb/CSecurityVeNCrypt.cxx @@ -147,13 +147,13 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) chosenType = secTypeInvalid; U8 i; list<U32>::iterator j; - list<U32> preferredList; + list<U32> secTypes; - /* Try preferred choice */ - preferredList = security->GetEnabledExtSecTypes(); + secTypes = security->GetEnabledExtSecTypes(); - for (j = preferredList.begin(); j != preferredList.end(); j++) { - for (i = 0; i < nAvailableTypes; i++) { + /* Honor server's security type order */ + for (i = 0; i < nAvailableTypes; i++) { + for (j = secTypes.begin(); j != secTypes.end(); j++) { if (*j == availableTypes[i]) { chosenType = *j; break; |