summaryrefslogtreecommitdiff
path: root/src/openvpn/ping-inline.h
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2016-12-27 18:25:47 +0100
commit3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (patch)
treef29063da5bec4caf3853d49a22a09c8619eebd21 /src/openvpn/ping-inline.h
parentd53dba59e78da865c4fe820386ff2f4f76925f3b (diff)
New upstream version 2.4.0upstream/2.4.0
Diffstat (limited to 'src/openvpn/ping-inline.h')
-rw-r--r--src/openvpn/ping-inline.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/openvpn/ping-inline.h b/src/openvpn/ping-inline.h
index c724970..2fa1d5c 100644
--- a/src/openvpn/ping-inline.h
+++ b/src/openvpn/ping-inline.h
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
+ * Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -30,30 +30,36 @@
* not received in n seconds?
*/
static inline void
-check_ping_restart (struct context *c)
+check_ping_restart(struct context *c)
{
- void check_ping_restart_dowork (struct context *c);
- if (c->options.ping_rec_timeout
- && event_timeout_trigger (&c->c2.ping_rec_interval,
- &c->c2.timeval,
- (!c->options.ping_timer_remote
- || link_socket_actual_defined (&c->c1.link_socket_addr.actual))
- ? ETT_DEFAULT : 15))
- check_ping_restart_dowork (c);
+ void check_ping_restart_dowork(struct context *c);
+
+ if (c->options.ping_rec_timeout
+ && event_timeout_trigger(&c->c2.ping_rec_interval,
+ &c->c2.timeval,
+ (!c->options.ping_timer_remote
+ || link_socket_actual_defined(&c->c1.link_socket_addr.actual))
+ ? ETT_DEFAULT : 15))
+ {
+ check_ping_restart_dowork(c);
+ }
}
/*
* Should we ping the remote?
*/
static inline void
-check_ping_send (struct context *c)
+check_ping_send(struct context *c)
{
- void check_ping_send_dowork (struct context *c);
- if (c->options.ping_send_timeout
- && event_timeout_trigger (&c->c2.ping_send_interval,
- &c->c2.timeval,
- !TO_LINK_DEF(c) ? ETT_DEFAULT : 1))
- check_ping_send_dowork (c);
+ void check_ping_send_dowork(struct context *c);
+
+ if (c->options.ping_send_timeout
+ && event_timeout_trigger(&c->c2.ping_send_interval,
+ &c->c2.timeval,
+ !TO_LINK_DEF(c) ? ETT_DEFAULT : 1))
+ {
+ check_ping_send_dowork(c);
+ }
}
-#endif
+#endif /* ifndef PING_INLINE_H */