diff options
author | Hyotaek Shim <hyotaek.shim@samsung.com> | 2016-08-16 18:13:28 +0900 |
---|---|---|
committer | Hyotaek Shim <hyotaek.shim@samsung.com> | 2016-08-16 18:13:28 +0900 |
commit | 34e94760396f38193467831bb98b465ff2212846 (patch) | |
tree | 073e22d026142e6db93fc5294757c35a46dfda17 | |
parent | 53de4842b35ae2b695b33f7eb1ed223b01736200 (diff) | |
download | dbus-34e94760396f38193467831bb98b465ff2212846.tar.gz dbus-34e94760396f38193467831bb98b465ff2212846.tar.bz2 dbus-34e94760396f38193467831bb98b465ff2212846.zip |
Relocate ifdef LIBDBUSPOLICY to avoid build erros when libdbuspolicy is disabled
Change-Id: I8710e8d2ff1911ea11b48984ebda227a0a8658fe
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
-rw-r--r-- | dbus/dbus-transport-kdbus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index 126e932c..2fa932e8 100644 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -646,13 +646,13 @@ debug_str (const char *msg, const DBusString *str) } #endif +#ifdef LIBDBUSPOLICY static int can_send (DBusTransportKdbus *transport, DBusMessage *message) { - int ret = DBUSPOLICY_RESULT_ALLOW; -#ifdef LIBDBUSPOLICY + int ret = DBUSPOLICY_RESULT_ALLOW; if (NULL != transport->policy) { dbus_uint32_t reply_serial = dbus_message_get_reply_serial (message); @@ -672,10 +672,10 @@ can_send (DBusTransportKdbus *transport, reply_serial, !dbus_message_get_no_reply (message)); } -#endif return ret; } +#endif /* function prototypes */ static int kdbus_message_size (const struct kdbus_msg *msg, @@ -897,6 +897,7 @@ kdbus_write_msg_internal (DBusTransportKdbus *transport, setup_bloom_filter_for_message (message, transport->kdbus, filter); } +#ifdef LIBDBUSPOLICY if (check_privileges) { int check; @@ -960,6 +961,7 @@ kdbus_write_msg_internal (DBusTransportKdbus *transport, goto out; } /* ret != DBUSPOLICY_RESULT_ALLOW */ } /* check_privileges */ +#endif if (send_message (transport, msg, |