Skip to content
Commit 4c58ffb5 authored by Michael Scott's avatar Michael Scott Committed by Anas Nashif
Browse files

net: lwm2m: dont release reply for duplicate block transfer



During normal use, a CoAP packet can be resent due to network congestion
and other causes.  During block transfer the LwM2M client checks to make
sure the block received is the one we expect and if not generates a
"duplicate" warning.  When this happened, we were releasing the reply
handler and when the correct block was received the client would
generate a "No handler" error.

To avoid releasing the reply handler too early, let's set the coap_reply
"user_data" field to an error condition (1).  Then, once the reply
processing is complete we can check the user_data field to be sure that
it's ok to release the reply handler.

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