[systemd-commits] 2 commits - src/libsystemd

Tom Gundersen tomegun at kemper.freedesktop.org
Fri Aug 15 11:32:41 PDT 2014


 src/libsystemd/sd-event/sd-event.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 050f74f286b12945e3eb13a45dca92783fa65bb8
Author: Tom Gundersen <teg at jklm.no>
Date:   Fri Aug 15 19:15:30 2014 +0200

    sd-event: return 'r' rather than '-errno'

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 3a9d934..7917ab9 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -779,7 +779,7 @@ _public_ int sd_event_add_io(
         r = source_io_register(s, s->enabled, events);
         if (r < 0) {
                 source_free(s);
-                return -errno;
+                return r;
         }
 
         if (ret)
@@ -1060,7 +1060,7 @@ _public_ int sd_event_add_child(
                 r = event_update_signal_fd(e);
                 if (r < 0) {
                         source_free(s);
-                        return -errno;
+                        return r;
                 }
         }
 

commit e07bbb7c503dca966b307e7af21e2efbc6f45b89
Author: Tom Gundersen <teg at jklm.no>
Date:   Fri Aug 15 18:21:18 2014 +0200

    sd-event: fix missing needs_rearm

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 1e3afae..3a9d934 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;



More information about the systemd-commits mailing list