]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update *when, when calling fr_event_timer_run
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 18 May 2019 01:28:57 +0000 (21:28 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 18 May 2019 01:28:57 +0000 (21:28 -0400)
src/lib/util/event.c

index f29cde6613fc4be6f5df3f4cbf739889b02dd826..1f9697662253272a8c5e4f20fcc1d894515ecaac 100644 (file)
@@ -1407,7 +1407,10 @@ int fr_event_timer_run(fr_event_list_t *el, fr_time_t *when)
        /*
         *      See if it's time to do this one.
         */
-       if (ev->when > *when) return 0;
+       if (ev->when > *when) {
+               *when = ev->when;
+               return 0;
+       }
 
        callback = ev->callback;
        memcpy(&uctx, &ev->uctx, sizeof(uctx));