Browse Source

sort zone list, assert unique elements

Darren Ranalli 22 years ago
parent
commit
60e7fb5596
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/distributed/ClientRepository.py

+ 4 - 1
direct/src/distributed/ClientRepository.py

@@ -359,7 +359,10 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
 
 
         # if we have an explicit list of visible zones, add them
         # if we have an explicit list of visible zones, add them
         if visibleZoneList is not None:
         if visibleZoneList is not None:
-            for zone in visibleZoneList:
+            vzl = list(visibleZoneList)
+            vzl.sort()
+            assert PythonUtil.uniqueElements(vzl)
+            for zone in vzl:
                 datagram.addUint32(zone)
                 datagram.addUint32(zone)
 
 
         # send the message
         # send the message