u->slice_job = mfree(u->slice_job);
u->service_job = mfree(u->service_job);
#endif // 0
+
u->service = mfree(u->service);
u->slice = mfree(u->slice);
u->runtime_path = mfree(u->runtime_path);
if (s && s->display && display_is_local(s->display))
u->display = s;
- if (realtime) {
- unsigned long long l;
- if (sscanf(realtime, "%llu", &l) > 0)
- u->timestamp.realtime = l;
- }
-
- if (monotonic) {
- unsigned long long l;
- if (sscanf(monotonic, "%llu", &l) > 0)
- u->timestamp.monotonic = l;
- }
+ if (realtime)
+ timestamp_deserialize(realtime, &u->timestamp.realtime);
+ if (monotonic)
+ timestamp_deserialize(monotonic, &u->timestamp.monotonic);
return r;
}
return 0;
fail:
- /* Try to clean up, but ignore errors */
+ /* Try to clean up, but ignore errors */
(void) rmdir(u->runtime_path);
return r;
}
u->service,
&error,
&job);
- if (r < 0) {
+ if (r < 0) {
/* we don't fail due to this, let's try to continue */
log_error_errno(r, "Failed to start user service, ignoring: %s", bus_error_message(&error, r));
- } else {
- u->service_job = job;
+ } else {
+ u->service_job = job;
}
#else
assert(u);