[tor-commits] [vidalia/alpha] Don't write torrc on SIGHUP if SAVECONF fails
chiiph at torproject.org
chiiph at torproject.org
Mon Jan 23 16:45:42 UTC 2012
commit 31428474593d283d1da951f05b71a2b7cad7f035
Author: Tomás Touceda <chiiph at torproject.org>
Date: Fri Jan 20 12:37:27 2012 -0300
Don't write torrc on SIGHUP if SAVECONF fails
---
src/torcontrol/TorControl.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/torcontrol/TorControl.cpp b/src/torcontrol/TorControl.cpp
index 5d31023..6908c61 100644
--- a/src/torcontrol/TorControl.cpp
+++ b/src/torcontrol/TorControl.cpp
@@ -914,7 +914,14 @@ bool
TorControl::saveConf(QString *errmsg)
{
ControlCommand cmd("SAVECONF");
- return send(cmd, errmsg);
+ bool ret = send(cmd, errmsg);
+
+ if(!ret) {
+ QString err;
+ setConf("__ReloadTorrcOnSIGHUP", "0", &err);
+ }
+
+ return ret;
}
/** Tells Tor to reset the given configuration keys back to defaults. */
More information about the tor-commits
mailing list