summaryrefslogtreecommitdiffstats
path: root/forward-inline.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-28 07:27:22 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-28 07:27:22 +0000
commite1e977f3cc52e230031f8770b0a9c977eab7db69 (patch)
treeb388e4c981ee17ebc53e4baf621b103cf839fc00 /forward-inline.h
parent3eee126eba7314e203a50b6398fa5333cbf12ff7 (diff)
downloadopenvpn-e1e977f3cc52e230031f8770b0a9c977eab7db69.tar.gz
openvpn-e1e977f3cc52e230031f8770b0a9c977eab7db69.tar.xz
openvpn-e1e977f3cc52e230031f8770b0a9c977eab7db69.zip
Added --server-poll-timeout option : when polling possible remote
servers to connect to in a round-robin fashion, spend no more than n seconds waiting for a response before trying the next server. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5010 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'forward-inline.h')
-rw-r--r--forward-inline.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/forward-inline.h b/forward-inline.h
index c87996d..bb8f542 100644
--- a/forward-inline.h
+++ b/forward-inline.h
@@ -119,6 +119,17 @@ check_inactivity_timeout (struct context *c)
}
#if P2MP
+
+static inline void
+check_server_poll_timeout (struct context *c)
+{
+ void check_server_poll_timeout_dowork (struct context *c);
+
+ if (c->options.server_poll_timeout
+ && event_timeout_trigger (&c->c2.server_poll_interval, &c->c2.timeval, ETT_DEFAULT))
+ check_server_poll_timeout_dowork (c);
+}
+
/*
* Scheduled exit?
*/