aboutsummaryrefslogtreecommitdiff
path: root/interval.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-16 18:58:49 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-09-16 18:58:49 +0000
commit72bf37c7130719ce105d73600341379389c4031f (patch)
tree7142dad3e0edd2a1b025d8ed14a43f9f235ccb42 /interval.h
parentUpdated version number to 2.1_rc19c. (diff)
downloadopenvpn-72bf37c7130719ce105d73600341379389c4031f.tar.xz
Modified client to send a PUSH_REQUEST message to server 1 second
after connection initiation rather than 0 seconds after. Successive PUSH_REQUEST messages after the first will continue to be sent at 5 second intervals until a response is received. This tends to speed up the client connection sequence by 4 seconds because the first PUSH_REQUEST message is usually sent too soon and is dropped, causing a wait of 5 seconds until the next PUSH_REQUEST message is sent. Version 2.1_rc19d git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4965 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'interval.h')
-rw-r--r--interval.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/interval.h b/interval.h
index afba948..f0e5875 100644
--- a/interval.h
+++ b/interval.h
@@ -177,6 +177,14 @@ event_timeout_reset (struct event_timeout* et)
et->last = now;
}
+static inline void
+event_timeout_modify_wakeup (struct event_timeout* et, interval_t n)
+{
+ /* note that you might need to call reset_coarse_timers after this */
+ if (et->defined)
+ et->n = (n >= 0) ? n : 0;
+}
+
/*
* This is the principal function for testing and triggering recurring
* timers and will return true on a timer signal event.