aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorSteven Murdoch <Steven.Murdoch@cl.cam.ac.uk>2010-06-16 19:47:06 +0100
committerNick Mathewson <nickm@torproject.org>2010-09-30 11:40:37 -0400
commita6dc00fa75fcb089837c50ba1af7a25e5e6e6b20 (patch)
tree989f64598746e21913ddab1b3557cb3136a05876 /src/or/main.c
parent3eaa9a376c756b0b8f836c4a78c3cf4012d6ffd7 (diff)
downloadtor-a6dc00fa75fcb089837c50ba1af7a25e5e6e6b20.tar.gz
tor-a6dc00fa75fcb089837c50ba1af7a25e5e6e6b20.zip
Start tor-fw-helper in the background, and log whatever it outputs
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 23daf13661..ddd5da3643 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1026,6 +1026,7 @@ run_scheduled_events(time_t now)
static time_t time_to_check_for_expired_networkstatus = 0;
static time_t time_to_write_stats_files = 0;
static time_t time_to_write_bridge_stats = 0;
+ static time_t time_to_check_port_forwarding = 0;
static int should_init_bridge_stats = 1;
static time_t time_to_retry_dns_init = 0;
or_options_t *options = get_options();
@@ -1385,6 +1386,17 @@ run_scheduled_events(time_t now)
#define BRIDGE_STATUSFILE_INTERVAL (30*60)
time_to_write_bridge_status_file = now+BRIDGE_STATUSFILE_INTERVAL;
}
+
+ if (time_to_check_port_forwarding < now &&
+ options->PortForwarding &&
+ server_mode(options)) {
+#define PORT_FORWARDING_CHECK_INTERVAL 5
+ tor_check_port_forwarding(options->PortForwardingHelper,
+ options->DirPort,
+ options->ORPort,
+ now);
+ time_to_check_port_forwarding = now+PORT_FORWARDING_CHECK_INTERVAL;
+ }
}
/** Timer: used to invoke second_elapsed_callback() once per second. */