-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: lib: coap_client: Improve cancel function #1667
Conversation
5f32af8
to
360b989
Compare
@juhaylinen @SeppoTakalo -- I would like your early review of this. If you agree with the approach then I will create an upstream PR and add the appropriate sauce tag here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the API is OK.
Clarify:
- Can the cancellation be called within the callback (like when we receive blockwise Block N=0).
- Does the cancellation work for blockwise?
55162d0
to
544ff88
Compare
303d143
to
ae91c6d
Compare
93a5804
to
6f429b1
Compare
6f429b1
to
b9f5451
Compare
a52c071
to
b8ee665
Compare
d948199
to
8897b2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some comments, but I left them on the upstream zephyr PR
8897b2a
to
8449afd
Compare
8449afd
to
9266e96
Compare
9266e96
to
b53dfab
Compare
@carlescufi I updated my commit in this PR to be |
535db7f
to
788b038
Compare
The coap_client lib only handled "one-shot" requests properly. This patch allows it to keep listening for additional responses to a request, if the request was made with the CoAP OBSERVE option appended. An API for canceling such requests is also added. Signed-off-by: Benjamin Lindqvist <[email protected]> (cherry picked from commit 0d14143)
Improve coap_client_cancel_requests(). Ensure it can be called from a callback. Report error to waiting callbacks. Clear active flag. This is useful when the network becomes unavailable or prior to disconnecting in order to save power. Signed-off-by: Pete Skeggs <[email protected]> (cherry picked from commit f04f8b2)
788b038
to
43dc8c6
Compare
No longer necessary; the upstream PR merged and was included in the recent upmerge. |
Improve coap_client_cancel_requests(). Ensure it can be called from a callback. Clear pending reqs. Report error to waiting callbacks. Clear active flag.
This is useful when the network becomes unavailable or prior to disconnecting in order to save power.
(cherry picked from commit f04f8b2)