[or-cvs] r22737: {arm} Crashing bug when fingerprint cache doesn't match startup de (arm/trunk/init)

Damian Johnson atagar1 at gmail.com
Sat Jul 31 09:41:40 UTC 2010


Author: atagar
Date: 2010-07-31 09:41:40 +0000 (Sat, 31 Jul 2010)
New Revision: 22737

Modified:
   arm/trunk/init/consensusTracker.py
Log:
Crashing bug when fingerprint cache doesn't match startup descriptors.



Modified: arm/trunk/init/consensusTracker.py
===================================================================
--- arm/trunk/init/consensusTracker.py	2010-07-31 07:23:56 UTC (rev 22736)
+++ arm/trunk/init/consensusTracker.py	2010-07-31 09:41:40 UTC (rev 22737)
@@ -351,11 +351,8 @@
     # determines which entries are new
     newEntries = []
     for nsEntry in nsEntries:
-      if not nsEntry.idhex in seenFingerprints:
-        newEntries.append(nsEntry)
-        seenFingerprints.add(nsEntry.idhex)
-        
-        # adds entry to descInfo hash
+      # adds entry to descInfo hash
+      if not nsEntry.idhex in descInfo:
         try:
           descLookupCmd = "desc/id/%s" % nsEntry.idhex
           router = TorCtl.Router.build_from_desc(conn.get_info(descLookupCmd)[descLookupCmd].split("\n"), nsEntry)
@@ -366,6 +363,10 @@
           print "Connection to tor is closed"
           sys.exit()
         
+      if not nsEntry.idhex in seenFingerprints:
+        newEntries.append(nsEntry)
+        seenFingerprints.add(nsEntry.idhex)
+        
         # records the seen fingerprint
         if seenFingerprintsFile:
           try:



More information about the tor-commits mailing list