chiark / gitweb /
dbus: log received message only once, in filter function
[elogind.git] / src / service.c
index 3bc56d02391508340b7e4d8e72ad02d00710d881..fed8227299279ec11e0370465f90318825fde23f 100644 (file)
@@ -526,7 +526,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
 
                                 state = LSB;
 
-                                FOREACH_WORD(w, z, t+9, i) {
+                                FOREACH_WORD_QUOTED(w, z, t+9, i) {
                                         char *n, *m;
 
                                         if (!(n = strndup(w, z))) {
@@ -563,7 +563,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
 
                                 state = LSB;
 
-                                FOREACH_WORD(w, z, strchr(t, ':')+1, i) {
+                                FOREACH_WORD_QUOTED(w, z, strchr(t, ':')+1, i) {
                                         char *n, *m;
 
                                         if (!(n = strndup(w, z))) {
@@ -2085,28 +2085,28 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
         } else if (streq(key, "main-exec-status-start-realtime")) {
                 uint64_t k;
 
-                if ((r = safe_atollu(value, &k)) < 0)
+                if ((r = safe_atou64(value, &k)) < 0)
                         log_debug("Failed to parse main-exec-status-start-realtime value %s", value);
                 else
                         s->main_exec_status.start_timestamp.realtime = (usec_t) k;
         } else if (streq(key, "main-exec-status-start-monotonic")) {
                 uint64_t k;
 
-                if ((r = safe_atollu(value, &k)) < 0)
+                if ((r = safe_atou64(value, &k)) < 0)
                         log_debug("Failed to parse main-exec-status-start-monotonic value %s", value);
                 else
                         s->main_exec_status.start_timestamp.monotonic = (usec_t) k;
         } else if (streq(key, "main-exec-status-exit-realtime")) {
                 uint64_t k;
 
-                if ((r = safe_atollu(value, &k)) < 0)
+                if ((r = safe_atou64(value, &k)) < 0)
                         log_debug("Failed to parse main-exec-status-exit-realtime value %s", value);
                 else
                         s->main_exec_status.exit_timestamp.realtime = (usec_t) k;
         } else if (streq(key, "main-exec-status-exit-monotonic")) {
                 uint64_t k;
 
-                if ((r = safe_atollu(value, &k)) < 0)
+                if ((r = safe_atou64(value, &k)) < 0)
                         log_debug("Failed to parse main-exec-status-exit-monotonic value %s", value);
                 else
                         s->main_exec_status.exit_timestamp.monotonic = (usec_t) k;
@@ -2374,7 +2374,7 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) {
                 break;
 
         case SERVICE_AUTO_RESTART:
-                log_debug("%s holdoff time over, scheduling restart.", u->meta.id);
+                log_info("%s holdoff time over, scheduling restart.", u->meta.id);
                 service_enter_restart(s);
                 break;