sd-event: always reshuffle time prioq on changing online/offline state v248.6
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Jun 2021 17:13:59 +0000 (02:13 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 23 Jul 2021 14:58:34 +0000 (16:58 +0200)
commit0db66a9bb5b37d47a0ff210e628589e4255df283
tree41185fb2e1f67b626f648702bada0570cfc699c0
parent63f3d322f0b63ccf655fa554484124696f388041
sd-event: always reshuffle time prioq on changing online/offline state

Before 81107b8419c39f726fd2805517a5b9faab204e59, the compare functions
for the latest or earliest prioq did not handle ratelimited flag.
So, it was ok to not reshuffle the time prioq when changing the flag.

But now, those two compare functions also compare the source is
ratelimited or not. So, it is necessary to reshuffle the time prioq
after changing the ratelimited flag.

Hopefully fixes #19903.

(cherry picked from commit 2115b9b6629eeba7bc9f42f757f38205febb1cb7)

Hopefully fixes #20285 and
https://bugzilla.redhat.com/show_bug.cgi?id=1984651.
src/libsystemd/sd-event/sd-event.c