summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rdisc/nm-lndp-rdisc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c
index 6b43ac8bf1..3a3419b3ca 100644
--- a/src/rdisc/nm-lndp-rdisc.c
+++ b/src/rdisc/nm-lndp-rdisc.c
@@ -402,8 +402,10 @@ check_timestamps (NMRDisc *rdisc, guint32 now, NMRDiscConfigMap changed)
g_signal_emit_by_name (rdisc, NM_RDISC_CONFIG_CHANGED, changed);
if (nextevent != never) {
- debug ("(%s): scheduling next now/lifetime check: %u seconds", rdisc->ifname, nextevent);
- priv->timeout_id = g_timeout_add_seconds (nextevent, timeout_cb, rdisc);
+ g_return_if_fail (nextevent > now);
+ debug ("(%s): scheduling next now/lifetime check: %u seconds",
+ rdisc->ifname, nextevent - now);
+ priv->timeout_id = g_timeout_add_seconds (nextevent - now, timeout_cb, rdisc);
}
}