Fix bug in StartNotify()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | Fix bug in characteristic_start_notify.src/ | +3 | 1 reply | |
| 1/1 | Fix bug in characteristic_start_notify. | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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