diff mbox series

[BlueZ,1/2] transport: Send reply to select/unselect

Message ID 20241025142842.46566-2-iulia.tanasescu@nxp.com
State New
Headers show
Series [BlueZ,1/2] transport: Send reply to select/unselect | expand

Commit Message

Iulia Tanasescu Oct. 25, 2024, 2:28 p.m. UTC
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.
---
 profiles/audio/transport.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 68192bae6..bc63772a6 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -1423,7 +1423,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,
@@ -1436,7 +1436,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,