summaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2011-02-21 13:40:33 +0000
committerAdam Tkac <atkac@redhat.com>2011-02-21 13:40:33 +0000
commitccb92454bf1984eea9451081232de90fa5dd7564 (patch)
tree253356936b5432dc0e18258d80657a3369fb4b66 /common/rfb
parent674bf066980a0d84612270ba6296bae84f2a0596 (diff)
downloadtigervnc-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.cxx10
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;