From 402766093258b3b3015e5b180355a75cacaece3a Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 5 Dec 2014 22:30:14 +0100 Subject: [PATCH] Update UTCP to the latest commit, which changes the return value of utcp_timeout(). Conflicts: src/utcp --- src/meshlink.c | 7 +++---- src/utcp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/meshlink.c b/src/meshlink.c index 51590200..994d8957 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -701,16 +701,15 @@ static bool ecdsa_keygen(meshlink_handle_t *mesh) { static struct timeval idle(event_loop_t *loop, void *data) { meshlink_handle_t *mesh = data; - int t, tmin = -1; + struct timeval t, tmin = {3600, 0}; for splay_each(node_t, n, mesh->nodes) { if(!n->utcp) continue; t = utcp_timeout(n->utcp); - if(t >= 0 && t < tmin) + if(timercmp(&t, &tmin, <)) tmin = t; } - struct timeval tv = {.tv_sec = t}; - return tv; + return tmin; } static bool meshlink_setup(meshlink_handle_t *mesh) { diff --git a/src/utcp b/src/utcp index 8d8944f2..b570e123 160000 --- a/src/utcp +++ b/src/utcp @@ -1 +1 @@ -Subproject commit 8d8944f2e16b8d11e54cb79e1d45023e84aed37f +Subproject commit b570e123128f3fafa583bae186fd61429dcb49a7 -- 2.39.5