zephyr/subsys/net/lib/zoap
Vinicius Costa Gomes 2d852f47d2 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: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-03 15:59:19 +02:00
..
Kbuild
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Makefile
zoap_link_format.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
zoap.c iot/zoap: Fix the return value of zoap_packet_get_payload() 2017-02-03 15:59:19 +02:00