diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-12 09:06:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-12 09:06:35 -0400 |
commit | 62743912bcbacc1bd918b60a80f3394647d2ef91 (patch) | |
tree | 9f7395c55812b7a39a880e41e29d612535fa2397 /src/app/config | |
parent | 0dbd4fe30961bb56539d3e2853244bd2e19f19b8 (diff) | |
parent | 7b27d98eaea3bbbcf367fdf87b3dabbc28ca1f9c (diff) | |
download | tor-62743912bcbacc1bd918b60a80f3394647d2ef91.tar.gz tor-62743912bcbacc1bd918b60a80f3394647d2ef91.zip |
Merge branch 'pr278_squashed'
Diffstat (limited to 'src/app/config')
-rw-r--r-- | src/app/config/config.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 1adeb75c98..9882e74367 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -1406,7 +1406,6 @@ static int options_act_reversible(const or_options_t *old_options, char **msg) { smartlist_t *new_listeners = smartlist_new(); - smartlist_t *replaced_listeners = smartlist_new(); or_options_t *options = get_options_mutable(); int running_tor = options->command == CMD_RUN_TOR; int set_conn_limit = 0; @@ -1491,8 +1490,7 @@ options_act_reversible(const or_options_t *old_options, char **msg) * shutting down. If networking is disabled, this will close all but the * control listeners, but disable those. */ if (!we_are_hibernating()) { - if (retry_all_listeners(replaced_listeners, new_listeners, - options->DisableNetwork) < 0) { + if (retry_all_listeners(new_listeners, options->DisableNetwork) < 0) { *msg = tor_strdup("Failed to bind one of the listener ports."); goto rollback; } @@ -1628,17 +1626,6 @@ options_act_reversible(const or_options_t *old_options, char **msg) "Overwrite the log afterwards.", badness); } - SMARTLIST_FOREACH(replaced_listeners, connection_t *, conn, - { - int marked = conn->marked_for_close; - log_notice(LD_NET, "Closing old %s on %s:%d", - conn_type_to_string(conn->type), conn->address, conn->port); - connection_close_immediate(conn); - if (!marked) { - connection_mark_for_close(conn); - } - }); - if (set_conn_limit) { /* * If we adjusted the conn limit, recompute the OOS threshold too @@ -1692,7 +1679,6 @@ options_act_reversible(const or_options_t *old_options, char **msg) done: smartlist_free(new_listeners); - smartlist_free(replaced_listeners); return r; } |