summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanghyeok.oh <sanghyeok.oh@samsung.com>2017-07-18 17:28:16 +0900
committersanghyeok.oh <sanghyeok.oh@samsung.com>2017-07-18 17:42:42 +0900
commit59aae7b82d79848f2f188f8b9bfa15d29cd6addc (patch)
tree5c5543ad8d67386e76db1a0d1ab151ba4009d329
parentdd656a50dc3ac0e284888d61caff367d1db20a67 (diff)
downloaddbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.tar.gz
dbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.tar.bz2
dbus-59aae7b82d79848f2f188f8b9bfa15d29cd6addc.zip
Otherwise just send it. It will checked by receiver. Change-Id: I9652f7548adf9605111d28cdc236f36fbe319c97 Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
-rwxr-xr-xdbus/dbus-transport-kdbus.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c
index c3630427..0683db5d 100755
--- a/dbus/dbus-transport-kdbus.c
+++ b/dbus/dbus-transport-kdbus.c
@@ -675,16 +675,22 @@ can_send (DBusTransportKdbus *transport,
* Otherwise - check the policy.
*/
if (0 == reply_serial)
- ret = dbuspolicy1_check_out (transport->policy,
- dbus_message_get_destination (message),
- transport->my_DBus_unique_name,
- dbus_message_get_path (message),
- dbus_message_get_interface (message),
- dbus_message_get_member (message),
- dbus_message_get_type (message),
- dbus_message_get_error_name (message),
- reply_serial,
- !dbus_message_get_no_reply (message));
+ {
+ /* If method call or unicast signal, check policy */
+ if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_CALL ||
+ (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL &&
+ dbus_message_get_destination (message) != NULL))
+ ret = dbuspolicy1_check_out (transport->policy,
+ dbus_message_get_destination (message),
+ transport->my_DBus_unique_name,
+ dbus_message_get_path (message),
+ dbus_message_get_interface (message),
+ dbus_message_get_member (message),
+ dbus_message_get_type (message),
+ dbus_message_get_error_name (message),
+ reply_serial,
+ !dbus_message_get_no_reply (message));
+ }
}
return ret;