linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing
@ 2024-10-25 14:28 Iulia Tanasescu
  2024-10-25 14:28 ` [PATCH BlueZ 1/2] transport: Send reply to select/unselect Iulia Tanasescu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Iulia Tanasescu @ 2024-10-25 14:28 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, andrei.istodorescu,
	luiz.dentz, Iulia Tanasescu

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 patch updates the select and unselect methods to send reply
messages. It also fixes the shell prints in client/player.c,
when the replies for select/unselect are received.

Iulia Tanasescu (2):
  transport: Send reply to select/unselect
  client/player: Fix select/unselect reply prints

 client/player.c            | 4 ++--
 profiles/audio/transport.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


base-commit: 806a552d53c787c0ddea9328a09b0ef124bca26e
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH BlueZ 1/2] transport: Send reply to select/unselect
  2024-10-25 14:28 [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing Iulia Tanasescu
@ 2024-10-25 14:28 ` Iulia Tanasescu
  2024-10-25 16:37   ` transport: Fix select/unselect reply missing bluez.test.bot
  2024-10-25 14:28 ` [PATCH BlueZ 2/2] client/player: Fix select/unselect reply prints Iulia Tanasescu
  2024-10-25 19:40 ` [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing patchwork-bot+bluetooth
  2 siblings, 1 reply; 5+ messages in thread
From: Iulia Tanasescu @ 2024-10-25 14:28 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, andrei.istodorescu,
	luiz.dentz, Iulia Tanasescu

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 --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,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH BlueZ 2/2] client/player: Fix select/unselect reply prints
  2024-10-25 14:28 [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing Iulia Tanasescu
  2024-10-25 14:28 ` [PATCH BlueZ 1/2] transport: Send reply to select/unselect Iulia Tanasescu
@ 2024-10-25 14:28 ` Iulia Tanasescu
  2024-10-25 19:40 ` [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: Iulia Tanasescu @ 2024-10-25 14:28 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: claudia.rosu, mihai-octavian.urzica, andrei.istodorescu,
	luiz.dentz, Iulia Tanasescu

This updates the shell print messages for the transport select/unselect
method replies. The bluetoothctl log below shows the fixed result:

client/bluetoothctl
[bluetooth]# endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06
[/local/endpoint/ep0] Auto Accept (yes/no): y
[/local/endpoint/ep0] Max Transports (auto/value): a
[/local/endpoint/ep0] Locations: 1
[/local/endpoint/ep0] Supported Context (value): 1
Capabilities:
  03 01 ff 00 02 02 03 05 04 1a 00 f0 00 02 03 01
Metadata:
[bluetooth]# Endpoint /local/endpoint/ep0 registered
[bluetooth]# scan on
[bluetooth]# [NEW] Device 17:7A:80:64:A7:93 17-7A-80-64-A7-93
[17-7A-80-64-A7-93]# [NEW] Transport
                /org/bluez/hci0/dev_17_7A_80_64_A7_93/bis1/fd0
[17-7A-80-64-A7-93]# transport.select
                /org/bluez/hci0/dev_17_7A_80_64_A7_93/bis1/fd0
[17-7A-80-64-A7-93]# [CHG] Transport
    /org/bluez/hci0/dev_17_7A_80_64_A7_93/bis1/fd0 State: broadcasting
[17-7A-80-64-A7-93]# Select successful
[17-7A-80-64-A7-93]# transport.unselect
                /org/bluez/hci0/dev_17_7A_80_64_A7_93/bis1/fd0
[17-7A-80-64-A7-93]# [CHG] Transport
    /org/bluez/hci0/dev_17_7A_80_64_A7_93/bis1/fd0 State: idle
[17-7A-80-64-A7-93]# Unselect successful
---
 client/player.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/player.c b/client/player.c
index 188378175..7a0631d2e 100644
--- a/client/player.c
+++ b/client/player.c
@@ -4870,7 +4870,7 @@ static void select_reply(DBusMessage *message, void *user_data)
 		return bt_shell_noninteractive_quit(EXIT_FAILURE);
 	}
 
-	bt_shell_printf("Select successful");
+	bt_shell_printf("Select successful\n");
 
 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }
@@ -4887,7 +4887,7 @@ static void unselect_reply(DBusMessage *message, void *user_data)
 		return bt_shell_noninteractive_quit(EXIT_FAILURE);
 	}
 
-	bt_shell_printf("Select successful");
+	bt_shell_printf("Unselect successful\n");
 
 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: transport: Fix select/unselect reply missing
  2024-10-25 14:28 ` [PATCH BlueZ 1/2] transport: Send reply to select/unselect Iulia Tanasescu
@ 2024-10-25 16:37   ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2024-10-25 16:37 UTC (permalink / raw)
  To: linux-bluetooth, iulia.tanasescu

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=903164

---Test result---

Test Summary:
CheckPatch                    PASS      0.86 seconds
GitLint                       PASS      0.62 seconds
BuildEll                      PASS      24.79 seconds
BluezMake                     PASS      1751.11 seconds
MakeCheck                     PASS      12.97 seconds
MakeDistcheck                 PASS      181.16 seconds
CheckValgrind                 PASS      254.25 seconds
CheckSmatch                   PASS      360.17 seconds
bluezmakeextell               PASS      123.96 seconds
IncrementalBuild              PASS      3214.92 seconds
ScanBuild                     PASS      1042.41 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing
  2024-10-25 14:28 [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing Iulia Tanasescu
  2024-10-25 14:28 ` [PATCH BlueZ 1/2] transport: Send reply to select/unselect Iulia Tanasescu
  2024-10-25 14:28 ` [PATCH BlueZ 2/2] client/player: Fix select/unselect reply prints Iulia Tanasescu
@ 2024-10-25 19:40 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2024-10-25 19:40 UTC (permalink / raw)
  To: Iulia Tanasescu
  Cc: linux-bluetooth, claudia.rosu, mihai-octavian.urzica,
	andrei.istodorescu, luiz.dentz

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 25 Oct 2024 17:28:40 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/2] transport: Send reply to select/unselect
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=36b26283cee3
  - [BlueZ,2/2] client/player: Fix select/unselect reply prints
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8c8ca715e05f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-25 19:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 14:28 [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing Iulia Tanasescu
2024-10-25 14:28 ` [PATCH BlueZ 1/2] transport: Send reply to select/unselect Iulia Tanasescu
2024-10-25 16:37   ` transport: Fix select/unselect reply missing bluez.test.bot
2024-10-25 14:28 ` [PATCH BlueZ 2/2] client/player: Fix select/unselect reply prints Iulia Tanasescu
2024-10-25 19:40 ` [PATCH BlueZ 0/2] transport: Fix select/unselect reply missing patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).