diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-07 16:05:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-07 16:05:13 -0400 |
commit | ed39621a9d97dc07063b6e9052b52a91b99d82d6 (patch) | |
tree | 56c4e4aa1f00f4b53a0ef1ac2c8e06d1da4ff376 /src/or/main.c | |
parent | 98e5c63eb254cb4b744281b75093c4bd7f73b6c6 (diff) | |
parent | 1174bb95ce79767cfaee4f50ce70f42e7eb01b2e (diff) | |
download | tor-ed39621a9d97dc07063b6e9052b52a91b99d82d6.tar.gz tor-ed39621a9d97dc07063b6e9052b52a91b99d82d6.zip |
Merge remote-tracking branch 'asn2/bug3656'
Conflicts:
src/common/util.c
src/common/util.h
src/or/config.h
src/or/main.c
src/test/test_util.c
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 4948d59ec3..aa167e1e9d 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -37,6 +37,7 @@ #include "ntmain.h" #include "onion.h" #include "policies.h" +#include "transports.h" #include "relay.h" #include "rendclient.h" #include "rendcommon.h" @@ -1086,7 +1087,9 @@ run_scheduled_events(time_t now) static int should_init_bridge_stats = 1; static time_t time_to_retry_dns_init = 0; static time_t time_to_next_heartbeat = 0; + static int has_validated_pt = 0; const or_options_t *options = get_options(); + int is_server = server_mode(options); int i; int have_dir_info; @@ -1463,7 +1466,7 @@ run_scheduled_events(time_t now) } } - /** 10b. write bridge networkstatus file to disk */ + /** 10. write bridge networkstatus file to disk */ if (options->BridgeAuthoritativeDir && time_to_write_bridge_status_file < now) { networkstatus_dump_bridge_status_to_file(now); @@ -1471,6 +1474,7 @@ run_scheduled_events(time_t now) time_to_write_bridge_status_file = now+BRIDGE_STATUSFILE_INTERVAL; } + /** 11. check the port forwarding app */ if (time_to_check_port_forwarding < now && options->PortForwarding && is_server) { @@ -1482,7 +1486,19 @@ run_scheduled_events(time_t now) time_to_check_port_forwarding = now+PORT_FORWARDING_CHECK_INTERVAL; } - /** 11. write the heartbeat message */ + /** 11b. check pending unconfigured managed proxies */ + if (pt_proxies_configuration_pending()) + pt_configure_remaining_proxies(); + + /** 11c. validate pluggable transports configuration if we need to */ + if (!has_validated_pt && + (options->Bridges || options->ClientTransportPlugin)) { + if (validate_pluggable_transports_config() == 0) { + has_validated_pt = 1; + } + } + + /** 12. write the heartbeat message */ if (options->HeartbeatPeriod && time_to_next_heartbeat < now) { log_heartbeat(now); @@ -2341,6 +2357,7 @@ tor_free_all(int postfork) clear_pending_onions(); circuit_free_all(); entry_guards_free_all(); + pt_free_all(); connection_free_all(); buf_shrink_freelists(1); memarea_clear_freelist(); |