]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Improve r4300 - also honor server's sectype order for VeNCrypt subtypes.
authorAdam Tkac <atkac@redhat.com>
Mon, 21 Feb 2011 13:40:33 +0000 (13:40 +0000)
committerAdam Tkac <atkac@redhat.com>
Mon, 21 Feb 2011 13:40:33 +0000 (13:40 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4302 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/CSecurityVeNCrypt.cxx

index 9c2cebaf09273bc96e867ed2554b63a75d6e65d1..77eeef9a8feb363d7528cefc18749a00d3d9570c 100644 (file)
@@ -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;