Skip to content

Fix bug in StartNotify()

Ahmed Alsharif linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Fix bug in characteristic_start_notify.src/gatt-client.c+3 -291 reply
1/1Fix bug in characteristic_start_notify.+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH BlueZ 0/1] Fix bug in StartNotify()

Hi,

if you call StartNotify() right after a device disappears, bluez returns an org.bluez.Error.InProgress, even though the device isn't there at all. A simple fix is checking the case of !gatt at the very beginning of function characteristic_start_notify, since we can return the correct error immediately. The patch returns an Error.NotConnected, which I think is the correct error in this case, but it can be problematic since this function never returned that before. Another possible error is Error.Failed with the message "Not connected" since that's already expected from the function. This patch also cancels out the cleaning of client at the bottom of the function, since we never create it in the first place when a device is not available.

cheers.

Ahmed (1):
Fix bug in characteristic_start_notify.

 src/gatt-client.c | 32 +++-----------------------------
 1 file changed, 3 insertions(+), 29 deletions(-)
Signature · 1 line
2.11.0