mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 16:54:38 +08:00
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.
This commit is contained in:
parent
5ad2dcf2b2
commit
68ff13358d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user