[or-cvs] r24023: {arm} Reloading torrc contents when a sighup is issued (caught by (in arm/trunk: . src/interface)

Damian Johnson atagar1 at gmail.com
Mon Jan 3 02:00:52 UTC 2011


Author: atagar
Date: 2011-01-03 02:00:52 +0000 (Mon, 03 Jan 2011)
New Revision: 24023

Modified:
   arm/trunk/TODO
   arm/trunk/src/interface/controller.py
Log:
Reloading torrc contents when a sighup is issued (caught by StrangeCharm)



Modified: arm/trunk/TODO
===================================================================
--- arm/trunk/TODO	2011-01-02 21:48:04 UTC (rev 24022)
+++ arm/trunk/TODO	2011-01-03 02:00:52 UTC (rev 24023)
@@ -62,6 +62,7 @@
     * pylint --indent-string="  " --disable=C,R interface/foo.py | less
     * double check __init__.py and README for changes
     * Gentoo notification (contact NightMonkey)
+    * ArcLinux notification
 
 - Roadmap for version 1.4.2
   [ ] refactor panels
@@ -101,9 +102,6 @@
     timing out the function if it takes too long, but a more efficient method
     for deduplication would be preferable.
   * when in client mode and tor stops the header panel doesn't say so
-  * util are assuming that tor is running under the default command name
-      attempt to determine the command name at runtime (if the pid is available
-      then ps can do the mapping)
   * util/torTools.py: effective bandwidth rate/burst measurements don't take
       SETCONF into consideration, blocked on:
       https://trac.torproject.org/projects/tor/ticket/1692

Modified: arm/trunk/src/interface/controller.py
===================================================================
--- arm/trunk/src/interface/controller.py	2011-01-02 21:48:04 UTC (rev 24022)
+++ arm/trunk/src/interface/controller.py	2011-01-03 02:00:52 UTC (rev 24023)
@@ -667,6 +667,16 @@
         
         # TODO: should redraw the torrcPanel
         #panels["torrc"].loadConfig()
+        
+        # reload the torrc if it's previously been loaded
+        if loadedTorrc.isLoaded():
+          try:
+            loadedTorrc.load()
+            if page == 3: panels["torrc"].redraw(True)
+          except IOError, exc:
+            msg = "Unable to load torrc (%s)" % sysTools.getFileErrorMsg(exc)
+            log.log(CONFIG["log.torrc.readFailed"], msg)
+        
         sighupTracker.isReset = False
       
       # gives panels a chance to take advantage of the maximum bounds



More information about the tor-commits mailing list