Skip to content
Commit 2d852f47 authored by Vinicius Costa Gomes's avatar Vinicius Costa Gomes Committed by Jukka Rissanen
Browse files

iot/zoap: Fix the return value of zoap_packet_get_payload()



The returning 'len' was always informing the remaining available space
in that net_buf fragment. This not the expected behaviour for
incoming packets, in this case, we really want the size for the
payload already present in the packet.

When this function is called with a packet without a payload, with
will return the available space in the packet, when the payload is
already set, it will return the size of that payload.

Change-Id: Ia4643b8c2a015ad2316bed037e457b186e420b19
Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
parent 55751eed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment