diff options
author | Colin Walters <walters@verbum.org> | 2013-03-18 14:38:24 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-18 19:59:32 -0400 |
commit | c6a818c82035da91e7987920510f0dda61d8781a (patch) | |
tree | aca8572ad6fdd72b93b47b8b3ee6ca584a948efa | |
parent | 8cb17a6dc88cecfcee3189765031e9e8a1f4106b (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.c | 4 | ||||
-rw-r--r-- | src/core/dbus-manager.c | 2 | ||||
-rw-r--r-- | src/core/dbus-snapshot.c | 2 | ||||
-rw-r--r-- | src/core/dbus-unit.c | 6 | ||||
-rw-r--r-- | src/core/dbus.c | 2 | ||||
-rw-r--r-- | src/hostname/hostnamed.c | 2 | ||||
-rw-r--r-- | src/locale/localed.c | 2 | ||||
-rw-r--r-- | src/login/logind-seat-dbus.c | 2 | ||||
-rw-r--r-- | src/login/logind-session-dbus.c | 2 | ||||
-rw-r--r-- | src/login/logind-user-dbus.c | 2 | ||||
-rw-r--r-- | src/timedate/timedated.c | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c index 20c2a6233..096542be3 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 | |||
116 | return bus_default_message_handler(connection, message, INTROSPECTION, INTERFACES_LIST, bps); | 116 | return bus_default_message_handler(connection, message, INTROSPECTION, INTERFACES_LIST, bps); |
117 | } | 117 | } |
118 | 118 | ||
119 | if (!dbus_connection_send(connection, reply, NULL)) | 119 | if (!bus_maybe_send_reply(connection, message, reply)) |
120 | return DBUS_HANDLER_RESULT_NEED_MEMORY; | 120 | return DBUS_HANDLER_RESULT_NEED_MEMORY; |
121 | 121 | ||
122 | return DBUS_HANDLER_RESULT_HANDLED; | 122 | return DBUS_HANDLER_RESULT_HANDLED; |
@@ -185,7 +185,7 @@ static DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBu | |||
185 | 185 | ||
186 | free(introspection); | 186 | free(introspection); |
187 | 187 | ||
188 | if (!dbus_connection_send(connection, reply, NULL)) | 188 | if (!bus_maybe_send_reply(connection, message, reply)) |
189 | goto oom; | 189 | goto oom; |
190 | 190 | ||
191 | return DBUS_HANDLER_RESULT_HANDLED; | 191 | return DBUS_HANDLER_RESULT_HANDLED; |
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 8f4bbc59b..75a341fce 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, | |||
1894 | } | 1894 | } |
1895 | 1895 | ||
1896 | if (reply) | 1896 | if (reply) |
1897 | if (!dbus_connection_send(connection, reply, NULL)) | 1897 | if (!bus_maybe_send_reply(connection, message, reply)) |
1898 | goto oom; | 1898 | goto oom; |
1899 | 1899 | ||
1900 | return DBUS_HANDLER_RESULT_HANDLED; | 1900 | return DBUS_HANDLER_RESULT_HANDLED; |
diff --git a/src/core/dbus-snapshot.c b/src/core/dbus-snapshot.c index 02cfcb182..2ae8574f5 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 | |||
77 | return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); | 77 | return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps); |
78 | } | 78 | } |
79 | 79 | ||
80 | if (!dbus_connection_send(c, reply, NULL)) | 80 | if (!bus_maybe_send_reply(c, message, reply)) |
81 | return DBUS_HANDLER_RESULT_NEED_MEMORY; | 81 | return DBUS_HANDLER_RESULT_NEED_MEMORY; |
82 | 82 | ||
83 | return DBUS_HANDLER_RESULT_HANDLED; | 83 | return DBUS_HANDLER_RESULT_HANDLED; |
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 7c23e1e61..dc7d1f13f 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 | |||
582 | } | 582 | } |
583 | 583 | ||
584 | if (reply) | 584 | if (reply) |
585 | if (!dbus_connection_send(connection, reply, NULL)) | 585 | if (!bus_maybe_send_reply(connection, message, reply)) |
586 | goto oom; | 586 | goto oom; |
587 | 587 | ||
588 | return DBUS_HANDLER_RESULT_HANDLED; | 588 | return DBUS_HANDLER_RESULT_HANDLED; |
@@ -673,7 +673,7 @@ static DBusHandlerResult bus_unit_message_handler(DBusConnection *connection, DB | |||
673 | 673 | ||
674 | free(introspection); | 674 | free(introspection); |
675 | 675 | ||
676 | if (!dbus_connection_send(connection, reply, NULL)) | 676 | if (!bus_maybe_send_reply(connection, message, reply)) |
677 | goto oom; | 677 | goto oom; |
678 | 678 | ||
679 | return DBUS_HANDLER_RESULT_HANDLED; | 679 | return DBUS_HANDLER_RESULT_HANDLED; |
@@ -886,7 +886,7 @@ DBusHandlerResult bus_unit_queue_job( | |||
886 | DBUS_TYPE_INVALID)) | 886 | DBUS_TYPE_INVALID)) |
887 | goto oom; | 887 | goto oom; |
888 | 888 | ||
889 | if (!dbus_connection_send(connection, reply, NULL)) | 889 | if (!bus_maybe_send_reply(connection, message, reply)) |
890 | goto oom; | 890 | goto oom; |
891 | 891 | ||
892 | return DBUS_HANDLER_RESULT_HANDLED; | 892 | return DBUS_HANDLER_RESULT_HANDLED; |
diff --git a/src/core/dbus.c b/src/core/dbus.c index 08aff1fd2..236ebc99d 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c | |||
@@ -406,7 +406,7 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus | |||
406 | dbus_error_free(&error); | 406 | dbus_error_free(&error); |
407 | 407 | ||
408 | if (reply) { | 408 | if (reply) { |
409 | if (!dbus_connection_send(connection, reply, NULL)) | 409 | if (!bus_maybe_send_reply(connection, message, reply)) |
410 | goto oom; | 410 | goto oom; |
411 | 411 | ||
412 | dbus_message_unref(reply); | 412 | dbus_message_unref(reply); |
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 979dcfdc7..25e154b22 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c | |||
@@ -605,7 +605,7 @@ static DBusHandlerResult hostname_message_handler( | |||
605 | if (!reply) | 605 | if (!reply) |
606 | goto oom; | 606 | goto oom; |
607 | 607 | ||
608 | if (!dbus_connection_send(connection, reply, NULL)) | 608 | if (!bus_maybe_send_reply(connection, message, reply)) |
609 | goto oom; | 609 | goto oom; |
610 | 610 | ||
611 | dbus_message_unref(reply); | 611 | dbus_message_unref(reply); |
diff --git a/src/locale/localed.c b/src/locale/localed.c index 4f85b8b58..60083b768 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c | |||
@@ -1277,7 +1277,7 @@ static DBusHandlerResult locale_message_handler( | |||
1277 | if (!(reply = dbus_message_new_method_return(message))) | 1277 | if (!(reply = dbus_message_new_method_return(message))) |
1278 | goto oom; | 1278 | goto oom; |
1279 | 1279 | ||
1280 | if (!dbus_connection_send(connection, reply, NULL)) | 1280 | if (!bus_maybe_send_reply(connection, message, reply)) |
1281 | goto oom; | 1281 | goto oom; |
1282 | 1282 | ||
1283 | dbus_message_unref(reply); | 1283 | dbus_message_unref(reply); |
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c index 7833d70a0..4da076e36 100644 --- a/src/login/logind-seat-dbus.c +++ b/src/login/logind-seat-dbus.c | |||
@@ -310,7 +310,7 @@ static DBusHandlerResult seat_message_dispatch( | |||
310 | } | 310 | } |
311 | 311 | ||
312 | if (reply) { | 312 | if (reply) { |
313 | if (!dbus_connection_send(connection, reply, NULL)) | 313 | if (!bus_maybe_send_reply(connection, message, reply)) |
314 | goto oom; | 314 | goto oom; |
315 | 315 | ||
316 | dbus_message_unref(reply); | 316 | dbus_message_unref(reply); |
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index ef73cd434..c4db31553 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c | |||
@@ -412,7 +412,7 @@ static DBusHandlerResult session_message_dispatch( | |||
412 | } | 412 | } |
413 | 413 | ||
414 | if (reply) { | 414 | if (reply) { |
415 | if (!dbus_connection_send(connection, reply, NULL)) | 415 | if (!bus_maybe_send_reply(connection, message, reply)) |
416 | goto oom; | 416 | goto oom; |
417 | 417 | ||
418 | dbus_message_unref(reply); | 418 | dbus_message_unref(reply); |
diff --git a/src/login/logind-user-dbus.c b/src/login/logind-user-dbus.c index ddf9d9d5c..5951c38cb 100644 --- a/src/login/logind-user-dbus.c +++ b/src/login/logind-user-dbus.c | |||
@@ -304,7 +304,7 @@ static DBusHandlerResult user_message_dispatch( | |||
304 | } | 304 | } |
305 | 305 | ||
306 | if (reply) { | 306 | if (reply) { |
307 | if (!dbus_connection_send(connection, reply, NULL)) | 307 | if (!bus_maybe_send_reply(connection, message, reply)) |
308 | goto oom; | 308 | goto oom; |
309 | 309 | ||
310 | dbus_message_unref(reply); | 310 | dbus_message_unref(reply); |
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 77534933c..85506f4fc 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c | |||
@@ -889,7 +889,7 @@ static DBusHandlerResult timedate_message_handler( | |||
889 | if (!(reply = dbus_message_new_method_return(message))) | 889 | if (!(reply = dbus_message_new_method_return(message))) |
890 | goto oom; | 890 | goto oom; |
891 | 891 | ||
892 | if (!dbus_connection_send(connection, reply, NULL)) | 892 | if (!bus_maybe_send_reply(connection, message, reply)) |
893 | goto oom; | 893 | goto oom; |
894 | 894 | ||
895 | dbus_message_unref(reply); | 895 | dbus_message_unref(reply); |