]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use fr_time()
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 12:43:39 +0000 (08:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 12:43:39 +0000 (08:43 -0400)
src/lib/server/main_loop.c

index e7a272bbdde41123370f0e8c222b7dcd74f304ea..6e05458e5b70b51886e56ba8d78ed44f210c3098 100644 (file)
@@ -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;
                }