For the Broadcast Sink defer setup scenario, there is no need to check for the POLLOUT event on the PA sync socket before calling "read" to issue the Create BIG sync command. This check has been inherited from unicast, but it is unnecessary for broadcast, since currently after accept and read, the event to signal BIG sync established is G_IO_IN. --- btio/btio.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/btio/btio.c b/btio/btio.c index d30cfcac7..2d277e409 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -5,7 +5,7 @@ * * Copyright (C) 2009-2010 Marcel Holtmann <marcel@xxxxxxxxxxxx> * Copyright (C) 2009-2010 Nokia Corporation - * Copyright 2023 NXP + * Copyright 2023-2024 NXP * * */ @@ -1800,7 +1800,6 @@ gboolean bt_io_bcast_accept(GIOChannel *io, BtIOConnect connect, { int sock; char c; - struct pollfd pfd; va_list args; struct sockaddr_iso *addr = NULL; uint8_t bc_num_bis = 0; @@ -1857,22 +1856,11 @@ gboolean bt_io_bcast_accept(GIOChannel *io, BtIOConnect connect, return FALSE; } - memset(&pfd, 0, sizeof(pfd)); - pfd.fd = sock; - pfd.events = POLLOUT; - - if (poll(&pfd, 1, 0) < 0) { - ERROR_FAILED(err, "poll", errno); + if (read(sock, &c, 1) < 0) { + ERROR_FAILED(err, "read", errno); return FALSE; } - if (!(pfd.revents & POLLOUT)) { - if (read(sock, &c, 1) < 0) { - ERROR_FAILED(err, "read", errno); - return FALSE; - } - } - server_add(io, connect, NULL, user_data, destroy); return TRUE; -- 2.39.2