* [PATCH BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR)
@ 2022-08-19 18:46 Luiz Augusto von Dentz
2022-08-19 18:55 ` [BlueZ] " bluez.test.bot
2022-08-19 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-08-19 18:46 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
shutdown(SHUT_RDWR) results in socket being HUP immeditaly instead of
waiting for Disconnect Complete event so instead just use SHUT_WR to
start the disconnect procedure without causing the socket to HUP.
---
tools/iso-tester.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index e4950ead7c69..5727f3055222 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -1185,18 +1185,18 @@ static gboolean iso_disconnected(GIOChannel *io, GIOCondition cond,
static void iso_shutdown(struct test_data *data, GIOChannel *io)
{
- int sk, cl;
+ int sk;
sk = g_io_channel_unix_get_fd(io);
- cl = dup(sk);
data->io_id[0] = g_io_add_watch(io, G_IO_HUP, iso_disconnected, data);
- /* Shutdown clone fd so the original fd don't HUP immediately and
- * properly wait for socket to be closed.
+ /* Shutdown using SHUT_WR as SHUT_RDWR cause the socket to HUP
+ * immediately instead of waiting for Disconnect Complete event.
*/
- shutdown(cl, SHUT_RDWR);
- close(cl);
+ shutdown(sk, SHUT_WR);
+
+ tester_print("Disconnecting...");
}
static gboolean iso_connect(GIOChannel *io, GIOCondition cond,
--
2.37.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR)
2022-08-19 18:46 [PATCH BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR) Luiz Augusto von Dentz
@ 2022-08-19 18:55 ` bluez.test.bot
2022-08-19 20:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-08-19 18:55 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: tools/iso-tester.c:1185
error: tools/iso-tester.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR)
2022-08-19 18:46 [PATCH BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR) Luiz Augusto von Dentz
2022-08-19 18:55 ` [BlueZ] " bluez.test.bot
@ 2022-08-19 20:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-08-19 20:00 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 19 Aug 2022 11:46:05 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> shutdown(SHUT_RDWR) results in socket being HUP immeditaly instead of
> waiting for Disconnect Complete event so instead just use SHUT_WR to
> start the disconnect procedure without causing the socket to HUP.
> ---
> tools/iso-tester.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Here is the summary with links:
- [BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR)
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4999f80c1f56
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] 3+ messages in thread
end of thread, other threads:[~2022-08-19 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-19 18:46 [PATCH BlueZ] iso-tester: Fix using shutdown(SHUT_RDWR) Luiz Augusto von Dentz
2022-08-19 18:55 ` [BlueZ] " bluez.test.bot
2022-08-19 20:00 ` [PATCH BlueZ] " 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