Skip to content
Commit 1bca60d7 authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: lwm2m: make release in lwm2m_release_message() optional



Let's rename lwm2m_release_message() to lwm2m_reset_message()
and add a parameter to let the function know whether or not to
release the lwm2m_message resource back to the pool.

By adding the optional release parameter, we can keep the
lwm2m_message but reset the underlying net_pkt / net_buf resources.
This allows us to regenerate the net_pkt after determining
an error has occured.  In this case, we don't want the previously
added net_pkt contents but we do want to maintain the message id,
token, etc.

Signed-off-by: default avatarMichael Scott <michael.scott@linaro.org>
parent fb734acc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment