From 19dbb1d5e3dd913f106d42ae5c8e9e759bd3fd51 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 13 Apr 2022 17:02:35 +0300 Subject: [PATCH] usteer: fix uchannel.uc script Once the uchannel.uc script sets its status to waiting, it becomes defunct. The next invocation of the script will compare uptime to state.uptime, and if the difference is less than 12h, it will change state.uptime to the current uptime and return. As the script runs every 5 minutes, the difference will always be less than 12h. Fix this by comparing uptime against state.changed rather than state.uptime. Fixes: WIFI-7613 Fixes: 670bc9d2e2d0 ("ucentral: development update") Signed-off-by: Stijn Tintel --- feeds/ucentral/usteer/files/usr/libexec/uchannel.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds/ucentral/usteer/files/usr/libexec/uchannel.uc b/feeds/ucentral/usteer/files/usr/libexec/uchannel.uc index 142a05ef5..a8530f340 100755 --- a/feeds/ucentral/usteer/files/usr/libexec/uchannel.uc +++ b/feeds/ucentral/usteer/files/usr/libexec/uchannel.uc @@ -272,7 +272,7 @@ function youngest() { let state = state_get(); if (state.status == "waiting" && - (uptime - state.uptime < (12 * 60 * 60))) { + (uptime - state.changed < (12 * 60 * 60))) { state_set(state); return; }