Skip to content
Commit 0bc4e761 authored by Robert Lubos's avatar Robert Lubos Committed by Maureen Helm
Browse files

net: coap: Fix coap_packet_get_payload function



The function did not work correct for packets generated with Zephyr
APIs, as `max_len` holds the entire buffer size, not the actual packet
size.

Additionally, unify how Payload Marker is handled in the calculation -
currently the coap parsing function adds it to the `opt_len` field,
which is counter-intuitive.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 78e84eb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment