X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-dbus.c;h=68e499f52c1fb9f9aff406cafcbd1d9db330f6b7;hb=a20affe2f0fb4c8d488155a0b860549e9389f32a;hp=228a8389ee06b410400872e518e992e23577a58a;hpb=7027ff61a34a12487712b382a061c654acc3a679;p=elogind.git diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 228a8389e..68e499f52 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -922,7 +922,7 @@ finish: static int attach_device(Manager *m, const char *seat, const char *sysfs) { struct udev_device *d; - char _cleanup_free_ *rule = NULL, *file = NULL; + _cleanup_free_ char *rule = NULL, *file = NULL; const char *id_for_seat; int r; @@ -971,7 +971,7 @@ finish: } static int flush_devices(Manager *m) { - DIR _cleanup_closedir_ *d; + _cleanup_closedir_ DIR *d; assert(m); @@ -1137,7 +1137,7 @@ static int bus_manager_can_shutdown_or_sleep( DBusMessage **_reply) { bool multiple_sessions, challenge, blocked, b; - const char *result; + const char *result = NULL; _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; int r; unsigned long ul; @@ -2400,7 +2400,6 @@ DBusHandlerResult bus_message_filter( log_error("Failed to parse JobRemoved message: %s", bus_error_message(&error)); else if (m->action_job && streq(m->action_job, path)) { - log_info("Operation finished."); /* Tell people that they now may take a lock again */ @@ -2441,7 +2440,7 @@ int manager_dispatch_delayed(Manager *manager) { assert(manager); - if (!manager->action_unit || manager->action_job) + if (manager->action_what == 0 || manager->action_job) return 0; /* Continue delay? */ @@ -2457,7 +2456,7 @@ int manager_dispatch_delayed(Manager *manager) { dbus_error_init(&error); r = execute_shutdown_or_sleep(manager, manager->action_what, manager->action_unit, &error); if (r < 0) { - log_warning("Failed to send delayed message: %s", bus_error_message_or_strerror(&error, -r)); + log_warning("Failed to send delayed message: %s", bus_error(&error, r)); dbus_error_free(&error); manager->action_unit = NULL;