summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-15 18:21:18 +0200
committerTom Gundersen <teg@jklm.no>2014-08-15 20:20:38 +0200
commite07bbb7c503dca966b307e7af21e2efbc6f45b89 (patch)
treef366e7228f6eec7dcf19a7281acf2d60f9271ad2 /src/libsystemd
parentdef9a7aa0182e5ecca3ac61b26f75136a5c4f103 (diff)
sd-event: fix missing needs_rearm
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-event/sd-event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 1e3afaeacc..3a9d934aad 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -894,6 +894,8 @@ _public_ int sd_event_add_time(
s->userdata = userdata;
s->enabled = SD_EVENT_ONESHOT;
+ d->needs_rearm = true;
+
r = prioq_put(d->earliest, s, &s->time.earliest_index);
if (r < 0)
goto fail;
@@ -902,8 +904,6 @@ _public_ int sd_event_add_time(
if (r < 0)
goto fail;
- d->needs_rearm = true;
-
if (ret)
*ret = s;
@@ -1872,6 +1872,7 @@ static int process_timer(
prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
prioq_reshuffle(d->latest, s, &s->time.latest_index);
+ d->needs_rearm = true;
}
return 0;