commit ab0c63dc0833e2cd8054d344f0705f4b7f126dad Author: Tomás Touceda chiiph@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 730e821..3cf7467 100644 --- a/src/torcontrol/TorControl.cpp +++ b/src/torcontrol/TorControl.cpp @@ -910,7 +910,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. */
tor-commits@lists.torproject.org