summaryrefslogtreecommitdiff
path: root/src/openvpn/interval.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-29 13:59:08 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-29 13:59:08 +0200
commitec0c1de5bfbf202261ca511d372c761b9745935b (patch)
tree3ebf1c9da90db82b07f7785332c9a35cc46aca19 /src/openvpn/interval.c
parent3408a277eb3293c0c29d50c66b42727ad31181aa (diff)
parent2c8e4bc4f9ab94e4d0b63341820d471af7c28c6c (diff)
Update upstream source from tag 'upstream/2.4.6'
Update to upstream version '2.4.6' with Debian dir 5e8196d02f26c4d63556a6dd9332ec86b95574cd
Diffstat (limited to 'src/openvpn/interval.c')
-rw-r--r--src/openvpn/interval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvpn/interval.c b/src/openvpn/interval.c
index 00ee627..b728560 100644
--- a/src/openvpn/interval.c
+++ b/src/openvpn/interval.c
@@ -51,11 +51,12 @@ event_timeout_trigger(struct event_timeout *et,
if (et->defined)
{
- int wakeup = (int) et->last + et->n - local_now;
+ time_t wakeup = et->last - local_now + et->n;
if (wakeup <= 0)
{
#if INTERVAL_DEBUG
- dmsg(D_INTERVAL, "EVENT event_timeout_trigger (%d) etcr=%d", et->n, et_const_retry);
+ dmsg(D_INTERVAL, "EVENT event_timeout_trigger (%d) etcr=%d", et->n,
+ et_const_retry);
#endif
if (et_const_retry < 0)
{
@@ -72,7 +73,8 @@ event_timeout_trigger(struct event_timeout *et,
if (tv && wakeup < tv->tv_sec)
{
#if INTERVAL_DEBUG
- dmsg(D_INTERVAL, "EVENT event_timeout_wakeup (%d/%d) etcr=%d", wakeup, et->n, et_const_retry);
+ dmsg(D_INTERVAL, "EVENT event_timeout_wakeup (%d/%d) etcr=%d",
+ (int) wakeup, et->n, et_const_retry);
#endif
tv->tv_sec = wakeup;
tv->tv_usec = 0;