mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 08:14:28 +08:00
gdbus: Fail to send NULL messages
This should make it safe to call g_dbus_send_message with a NULL message which is more likely to happen now that g_dbus_create_reply returns NULL when the message is marked with NO_REPLY flag.
This commit is contained in:
parent
5475f8bb2f
commit
e3767039f4
@ -1502,6 +1502,9 @@ gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
|
||||
{
|
||||
dbus_bool_t result = FALSE;
|
||||
|
||||
if (!message)
|
||||
return FALSE;
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user