summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-03-18 18:38:24 (GMT)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-18 23:59:32 (GMT)
commitc6a818c82035da91e7987920510f0dda61d8781a (patch)
treeaca8572ad6fdd72b93b47b8b3ee6ca584a948efa
parent8cb17a6dc88cecfcee3189765031e9e8a1f4106b (diff)
Use bus_maybe_send_reply() where applicable
This is a followup to: commit 1a37b9b9043ef83e9900e460a9a1fccced3acf89 It will fix denial messages from dbus-daemon between gdm and systemd-logind on logging into GNOME due to this. See the previous commit for more details.
-rw-r--r--src/core/dbus-job.c4
-rw-r--r--src/core/dbus-manager.c2
-rw-r--r--src/core/dbus-snapshot.c2
-rw-r--r--src/core/dbus-unit.c6
-rw-r--r--src/core/dbus.c2
-rw-r--r--src/hostname/hostnamed.c2
-rw-r--r--src/locale/localed.c2
-rw-r--r--src/login/logind-seat-dbus.c2
-rw-r--r--src/login/logind-session-dbus.c2
-rw-r--r--src/login/logind-user-dbus.c2
-rw-r--r--src/timedate/timedated.c2
11 files changed, 14 insertions, 14 deletions
diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c
index 20c2a62..096542b 100644
--- a/src/core/dbus-job.c
+++ b/src/core/dbus-job.c
@@ -116,7 +116,7 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec
return bus_default_message_handler(connection, message, INTROSPECTION, INTERFACES_LIST, bps);
}
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
return DBUS_HANDLER_RESULT_NEED_MEMORY;
return DBUS_HANDLER_RESULT_HANDLED;
@@ -185,7 +185,7 @@ static DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBu
free(introspection);
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 8f4bbc5..75a341f 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1894,7 +1894,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
}
if (reply)
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
diff --git a/src/core/dbus-snapshot.c b/src/core/dbus-snapshot.c
index 02cfcb1..2ae8574 100644
--- a/src/core/dbus-snapshot.c
+++ b/src/core/dbus-snapshot.c
@@ -77,7 +77,7 @@ DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusConnection *c, DBusM
return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps);
}
- if (!dbus_connection_send(c, reply, NULL))
+ if (!bus_maybe_send_reply(c, message, reply))
return DBUS_HANDLER_RESULT_NEED_MEMORY;
return DBUS_HANDLER_RESULT_HANDLED;
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 7c23e1e..dc7d1f1 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -582,7 +582,7 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusConnection *conn
}
if (reply)
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
@@ -673,7 +673,7 @@ static DBusHandlerResult bus_unit_message_handler(DBusConnection *connection, DB
free(introspection);
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
@@ -886,7 +886,7 @@ DBusHandlerResult bus_unit_queue_job(
DBUS_TYPE_INVALID))
goto oom;
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 08aff1f..236ebc9 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -406,7 +406,7 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus
dbus_error_free(&error);
if (reply) {
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 979dcfd..25e154b 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -605,7 +605,7 @@ static DBusHandlerResult hostname_message_handler(
if (!reply)
goto oom;
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 4f85b8b..60083b7 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -1277,7 +1277,7 @@ static DBusHandlerResult locale_message_handler(
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 7833d70..4da076e 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -310,7 +310,7 @@ static DBusHandlerResult seat_message_dispatch(
}
if (reply) {
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index ef73cd4..c4db315 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -412,7 +412,7 @@ static DBusHandlerResult session_message_dispatch(
}
if (reply) {
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c
index ddf9d9d..5951c38 100644
--- a/src/login/logind-user-dbus.c
+++ b/src/login/logind-user-dbus.c
@@ -304,7 +304,7 @@ static DBusHandlerResult user_message_dispatch(
}
if (reply) {
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 7753493..85506f4 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -889,7 +889,7 @@ static DBusHandlerResult timedate_message_handler(
if (!(reply = dbus_message_new_method_return(message)))
goto oom;
- if (!dbus_connection_send(connection, reply, NULL))
+ if (!bus_maybe_send_reply(connection, message, reply))
goto oom;
dbus_message_unref(reply);