transport: Send reply to select/unselect
authorIulia Tanasescu <iulia.tanasescu@nxp.com>
Fri, 25 Oct 2024 14:28:41 +0000 (17:28 +0300)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 20 Feb 2025 07:43:24 +0000 (16:43 +0900)
When a transport is selected from bluetoothctl, a reply is expected.
Currently, if the method call is successful, no reply is sent, causing
the following error message in bluetoothctl:

transport.Failed to select: org.freedesktop.DBus.Error.NoReply

The same error can be reproduced for the unselect method.

This commit updates the select and unselect methods to send reply
messages.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
profiles/audio/transport.c

index 4bb6f59f26c4e6b07ee97d449e6b286a593372b0..c875247f63f3bc10c666ab7b0358199dfc6f3716 100644 (file)
@@ -1574,7 +1574,7 @@ static DBusMessage *select_transport(DBusConnection *conn, DBusMessage *msg,
                transport_update_playing(transport, TRUE);
        }
 
-       return NULL;
+       return dbus_message_new_method_return(msg);
 }
 
 static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg,
@@ -1587,7 +1587,7 @@ static DBusMessage *unselect_transport(DBusConnection *conn, DBusMessage *msg,
                transport_update_playing(transport, FALSE);
        }
 
-       return NULL;
+       return dbus_message_new_method_return(msg);
 }
 
 static void sink_state_changed(struct btd_service *service,