[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20293: {torctl} Add some debug mssages dealing with exit setting. (torctl/trunk/python/TorCtl)



Author: mikeperry
Date: 2009-08-14 17:43:11 -0400 (Fri, 14 Aug 2009)
New Revision: 20293

Modified:
   torctl/trunk/python/TorCtl/PathSupport.py
   torctl/trunk/python/TorCtl/ScanSupport.py
Log:

Add some debug mssages dealing with exit setting.



Modified: torctl/trunk/python/TorCtl/PathSupport.py
===================================================================
--- torctl/trunk/python/TorCtl/PathSupport.py	2009-08-14 21:42:23 UTC (rev 20292)
+++ torctl/trunk/python/TorCtl/PathSupport.py	2009-08-14 21:43:11 UTC (rev 20293)
@@ -1180,6 +1180,7 @@
       self.bad_restrictions = True
     else:
       self.exit_rstr.add_restriction(IdHexRestriction(self.exit_id))
+      plog("DEBUG", "Added exit restriction for "+self.exit_id)
       try:
         self.path_selector.exit_gen.rebuild()
         self.bad_restrictions = False
@@ -1481,6 +1482,7 @@
       circ.pending_streams.extend(unattached_streams)
       self.circuits[circ.circ_id] = circ
     self.last_exit = circ.exit
+    plog("DEBUG", "Set last exit to "+self.last_exit.idhex)
 
   def circ_status_event(self, c):
     output = [c.event_name, str(c.circ_id), c.status]

Modified: torctl/trunk/python/TorCtl/ScanSupport.py
===================================================================
--- torctl/trunk/python/TorCtl/ScanSupport.py	2009-08-14 21:42:23 UTC (rev 20292)
+++ torctl/trunk/python/TorCtl/ScanSupport.py	2009-08-14 21:43:11 UTC (rev 20293)
@@ -143,7 +143,9 @@
     return cond._rank
 
   def get_exit_node(self):
-    return copy.copy(self.last_exit) # GIL FTW
+    ret = copy.copy(self.last_exit) # GIL FTW
+    plog("DEBUG", "Got last exit of "+ret.idhex)
+    return ret
 
   def set_exit_node(self, arg):
     cond = threading.Condition()