summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-12-28 12:51:03 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2012-12-30 18:49:45 (GMT)
commit759a661995e13094c2052d4af35029f8f5be767d (patch)
treee2973fdb9cb3c99b876437c078f5a7f3776d4e00 /gdbus
parent39a1cb7ea739f3f869795da45f314bba6e0304a9 (diff)
downloadconnman-759a661995e13094c2052d4af35029f8f5be767d.zip
connman-759a661995e13094c2052d4af35029f8f5be767d.tar.gz
connman-759a661995e13094c2052d4af35029f8f5be767d.tar.bz2
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')
-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);