diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-06-24 20:40:00 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-06-24 20:40:00 +0200 |
commit | 19bc719ec28e731159671b06254d9bfd49014894 (patch) | |
tree | 996233ceb953845efa7460763adb07cdbd26044a /src | |
parent | ed18b08bed983b845c72a83666a7d7db546d89ad (diff) |
logind: make sure we hand out write fd, and keep read fd for session end detection
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus.c | 2 | ||||
-rw-r--r-- | src/logind-dbus.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dbus.c b/src/dbus.c index 2a379a2b3e..93a19a45cd 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -446,7 +446,7 @@ static DBusHandlerResult system_bus_message_filter(DBusConnection *connection, D if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &cgroup, DBUS_TYPE_INVALID)) - log_error("Failed to parse Released message: %s", error.message); + log_error("Failed to parse Released message: %s", bus_error_message(&error)); else cgroup_notify_empty(m, cgroup); } diff --git a/src/logind-dbus.c b/src/logind-dbus.c index 10a826bc94..693906ef70 100644 --- a/src/logind-dbus.c +++ b/src/logind-dbus.c @@ -382,8 +382,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess goto fail; } - session->pipe_fd = pipe_fds[1]; - pipe_fds[1] = -1; + session->pipe_fd = pipe_fds[0]; + pipe_fds[0] = -1; if (s) { r = seat_attach_session(s, session); @@ -412,7 +412,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess DBUS_TYPE_STRING, &session->id, DBUS_TYPE_OBJECT_PATH, &p, DBUS_TYPE_STRING, &session->user->runtime_path, - DBUS_TYPE_UNIX_FD, &pipe_fds[0], + DBUS_TYPE_UNIX_FD, &pipe_fds[1], DBUS_TYPE_INVALID); free(p); @@ -421,7 +421,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess goto fail; } - close_nointr_nofail(pipe_fds[0]); + close_nointr_nofail(pipe_fds[1]); *_reply = reply; return 0; |