Message ID | 20230907151229.7306-2-iulia.tanasescu@nxp.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ed0def339ccad7b69278ab613f9fa058d288101c |
Headers | show |
Series | shared/bass: Add Set Broadcast_Code opcode handler | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | warning | CheckSparse WARNING monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1859:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3606:52: warning: array of flexible structuresmonitor/bt.h:3594:40: warning: array of flexible structures |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
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=782237 ---Test result--- Test Summary: CheckPatch PASS 1.80 seconds GitLint PASS 2.37 seconds BuildEll PASS 27.39 seconds BluezMake PASS 845.83 seconds MakeCheck PASS 11.51 seconds MakeDistcheck PASS 162.80 seconds CheckValgrind PASS 257.55 seconds CheckSmatch WARNING 350.77 seconds bluezmakeextell PASS 105.80 seconds IncrementalBuild PASS 2088.23 seconds ScanBuild PASS 1073.11 seconds Details ############################## Test: CheckSmatch - WARNING Desc: Run smatch tool with source Output: monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1859:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3606:52: warning: array of flexible structuresmonitor/bt.h:3594:40: warning: array of flexible structures --- Regards, Linux Bluetooth
diff --git a/btio/btio.c b/btio/btio.c index 8d9959038..c6d056b89 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -1789,6 +1789,37 @@ gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data, return TRUE; } +gboolean bt_io_bcast_accept(GIOChannel *io, BtIOConnect connect, + gpointer user_data, GDestroyNotify destroy, + GError * *err) +{ + int sock; + char c; + struct pollfd pfd; + + sock = g_io_channel_unix_get_fd(io); + + memset(&pfd, 0, sizeof(pfd)); + pfd.fd = sock; + pfd.events = POLLOUT; + + if (poll(&pfd, 1, 0) < 0) { + ERROR_FAILED(err, "poll", 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; +} + gboolean bt_io_set(GIOChannel *io, GError **err, BtIOOption opt1, ...) { va_list args; diff --git a/btio/btio.h b/btio/btio.h index 642af2e22..3169bebf3 100644 --- a/btio/btio.h +++ b/btio/btio.h @@ -75,6 +75,10 @@ typedef void (*BtIOConnect)(GIOChannel *io, GError *err, gpointer user_data); gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data, GDestroyNotify destroy, GError **err); +gboolean bt_io_bcast_accept(GIOChannel *io, BtIOConnect connect, + gpointer user_data, GDestroyNotify destroy, + GError **err); + gboolean bt_io_set(GIOChannel *io, GError **err, BtIOOption opt1, ...); gboolean bt_io_get(GIOChannel *io, GError **err, BtIOOption opt1, ...);