[tor-commits] [tor/master] No longer writing control ports to file if updating reversible options fail. Fixes #5605.

nickm at torproject.org nickm at torproject.org
Fri Oct 25 16:07:21 UTC 2013


commit b336e8c74ef996045694ec9c60054729def721c4
Author: Kevin Butler <haqkrs at gmail.com>
Date:   Mon Sep 2 19:25:08 2013 +0100

    No longer writing control ports to file if updating reversible options fail. Fixes #5605.
---
 changes/bug5605 |    2 ++
 src/or/config.c |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/changes/bug5605 b/changes/bug5605
new file mode 100644
index 0000000..ae66a6e
--- /dev/null
+++ b/changes/bug5605
@@ -0,0 +1,2 @@
+o Minor Bugfixes:
+    - No longer writing control ports to file if updating reversible options fail. Fixes #5605.
\ No newline at end of file
diff --git a/src/or/config.c b/src/or/config.c
index 657bc60..cb3dc57 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1115,9 +1115,6 @@ options_act_reversible(const or_options_t *old_options, char **msg)
     /* No need to roll back, since you can't change the value. */
   }
 
-  /* Write control ports to disk as appropriate */
-  control_ports_write_to_file();
-
   if (directory_caches_v2_dir_info(options)) {
     char *fn = NULL;
     tor_asprintf(&fn, "%s"PATH_SEPARATOR"cached-status",
@@ -1315,6 +1312,9 @@ options_act(const or_options_t *old_options)
     }
   }
 
+  /* Write control ports to disk as appropriate */
+  control_ports_write_to_file();
+
   if (running_tor && !have_lockfile()) {
     if (try_locking(options, 1) < 0)
       return -1;





More information about the tor-commits mailing list