summaryrefslogtreecommitdiff
path: root/gdbus/object.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-12-28 14:51:03 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-12-30 10:50:08 -0800
commitd91f3cb54c3ae052f1dc1cf89f5b1aeb11b1af7c (patch)
tree202f7902420effd1efee8c2a19e2785182bf0789 /gdbus/object.c
parent829427bf9fec288ab11d1f797ad47665fdab2dc1 (diff)
downloadneard-d91f3cb54c3ae052f1dc1cf89f5b1aeb11b1af7c.tar.gz
neard-d91f3cb54c3ae052f1dc1cf89f5b1aeb11b1af7c.tar.bz2
neard-d91f3cb54c3ae052f1dc1cf89f5b1aeb11b1af7c.zip
gdbus: Call check_signals when sending signals with g_dbus_send_message
If message passed to g_dbus_send_message is a signal verify if it is a valid and there really exists an interface with respective signal name.
Diffstat (limited to 'gdbus/object.c')
-rw-r--r--gdbus/object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index c6bdd59..b9cb284 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1511,6 +1511,15 @@ gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL)
dbus_message_set_no_reply(message, TRUE);
+ else if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) {
+ const char *path = dbus_message_get_path(message);
+ const char *interface = dbus_message_get_interface(message);
+ const char *name = dbus_message_get_member(message);
+ const GDBusArgInfo *args;
+
+ if (!check_signal(connection, path, interface, name, &args))
+ return FALSE;
+ }
result = dbus_connection_send(connection, message, NULL);