zephyr/subsys/net/lib/coap
Benjamin Lindqvist ed025b2f04 net: lib: coap_client: observe-related fixes
An earlier pull request implementing observe support was merged too
hastily. It had a few issues:

1. The predicate for whether a request should be marked not ongoing was
wrong (it checked ret != 0 instead of ret < 0)
2. Without observes in mind, MID-based deduplication is not a required
feature. Deduplication was handled implicitly - the exchange would get
dropped after the first response anyway, so duplicate responses would
not get matched to anything. But with observes, there are several
responses in an exchange. This commit adds this.
3. Using coap_request_is_observe(&internal_req->request) in the response
handler requires the whole request to stay in scope for the lifetime of
the observation, which I observed was not always the case. Adding an
is_observe bool to the internal struct improved stability significantly.

With these fixes, GETs with observe option works very well.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2024-05-21 16:42:38 -04:00
..
CMakeLists.txt net: lib: coap: Add CoAP server shell 2023-11-09 11:21:42 +01:00
coap.c net: lwm2m: Fix socket hints for block transfer 2024-03-28 16:02:34 -05:00
coap_client.c net: lib: coap_client: observe-related fixes 2024-05-21 16:42:38 -04:00
coap_link_format.c net: lib: coap: Add resources length based variants 2023-11-09 11:21:42 +01:00
coap_server.c net: Use always zephyr/posix/fcntl.h 2024-03-27 13:40:13 -05:00
coap_server_shell.c net: lib: coap: Add CoAP server shell 2023-11-09 11:21:42 +01:00
Kconfig net: lib: coap: set MAX_RETRANSMIT maximum to 100 2024-04-09 20:11:21 +02:00