From: Alan T. DeKok Date: Wed, 8 Sep 2021 12:43:39 +0000 (-0400) Subject: use fr_time() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9c786339009add1f829455f2afb7749b4ce48d3;p=thirdparty%2Ffreeradius-server.git use fr_time() --- diff --git a/src/lib/server/main_loop.c b/src/lib/server/main_loop.c index e7a272bbdde..6e05458e5b7 100644 --- a/src/lib/server/main_loop.c +++ b/src/lib/server/main_loop.c @@ -118,11 +118,11 @@ static void main_loop_signal_process(int flag) * Tell the even loop to stop processing. */ if ((flag & RADIUS_SIGNAL_SELF_HUP) != 0) { - time_t when; - static time_t last_hup = 0; + fr_time_t when; + static fr_time_t last_hup = 0; - when = time(NULL); - if (when - last_hup < (time_t) 5) { + when = fr_time(); + if (when - last_hup < fr_time_delta_from_sec(5)) { INFO("Ignoring HUP (less than 5s since last one)"); return; }