]> sigrok.org Git - libsigrok.git/commit - src/bt/bt_bluez.c
serial_bt, bluez: rework diag in BLE reception, accept zero length data
authorGerhard Sittig <redacted>
Sun, 19 Mar 2023 14:59:31 +0000 (15:59 +0100)
committerGerhard Sittig <redacted>
Sun, 19 Mar 2023 21:40:08 +0000 (22:40 +0100)
commita8b0e6f538b9f1d5d30af3695a1b625c9b626935
treefef02066f292f33d392b13f83c774f648beddfcf
parent0c7c6a1d7e2ad201a540fae1abb3843f26fea1e7
serial_bt, bluez: rework diag in BLE reception, accept zero length data

Rework how the sr_bt_check_notify() routine processes messages that were
received from a Bluetooth socket. Comment on edge cases that we have yet
to see how they are handled. Extend the amount of details that are given
in diagnostics messages, and tune their verbosity level. The debug level
nicely illustrates how data flows, the spew level makes bytes available.

Consider zero length data chunks in receive code paths non-fatal. Accept
either NULL or non-NULL addresses when the length is zero. A NULL pointer
in combination with a non-zero length is considered fatal though.
src/bt/bt_bluez.c
src/serial_bt.c