All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iulia Tanasescu <iulia.tanasescu@nxp.com>
To: linux-bluetooth@vger.kernel.org
Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com,
	silviu.barbulescu@nxp.com, vlad.pruteanu@nxp.com,
	andrei.istodorescu@nxp.com, luiz.dentz@gmail.com,
	Iulia Tanasescu <iulia.tanasescu@nxp.com>
Subject: [PATCH BlueZ 1/4] btio: Handle closed channel in server_cb
Date: Mon, 16 Oct 2023 18:48:57 +0300	[thread overview]
Message-ID: <20231016154900.3094-2-iulia.tanasescu@nxp.com> (raw)
In-Reply-To: <20231016154900.3094-1-iulia.tanasescu@nxp.com>

This handles G_IO_ERR and G_IO_HUP conditions in server_cb

---
 btio/btio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/btio/btio.c b/btio/btio.c
index d45b8240d..c63a6d1df 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -247,7 +247,8 @@ static gboolean server_cb(GIOChannel *io, GIOCondition cond,
 	GIOChannel *cli_io;
 
 	/* If the user closed the server */
-	if ((cond & G_IO_NVAL) || check_nval(io))
+	if ((cond & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) ||
+			check_nval(io))
 		return FALSE;
 
 	srv_sock = g_io_channel_unix_get_fd(io);
-- 
2.39.2


  reply	other threads:[~2023-10-16 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 15:48 [PATCH BlueZ 0/4] Add Modify Source initial implementation Iulia Tanasescu
2023-10-16 15:48 ` Iulia Tanasescu [this message]
2023-10-16 17:00   ` [PATCH BlueZ 1/4] btio: Handle closed channel in server_cb Luiz Augusto von Dentz
2023-10-25 14:55     ` Iulia Tanasescu
2023-10-16 17:53   ` Add Modify Source initial implementation bluez.test.bot
2023-10-16 15:48 ` [PATCH BlueZ 2/4] shared/bass: Handle G_IO_HUP on io channels Iulia Tanasescu
2023-10-16 17:04   ` Luiz Augusto von Dentz
2023-10-25 15:00     ` Iulia Tanasescu
2023-10-16 15:48 ` [PATCH BlueZ 3/4] btio: Allow binding a bcast listener before accept Iulia Tanasescu
2023-10-16 15:49 ` [PATCH BlueZ 4/4] shared/bass: Add Modify Source initial implementation Iulia Tanasescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231016154900.3094-2-iulia.tanasescu@nxp.com \
    --to=iulia.tanasescu@nxp.com \
    --cc=andrei.istodorescu@nxp.com \
    --cc=claudia.rosu@nxp.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=mihai-octavian.urzica@nxp.com \
    --cc=silviu.barbulescu@nxp.com \
    --cc=vlad.pruteanu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.