Skip to content

Commit cf28b5a

Browse files
rluboscfriedt
authored andcommitted
net: lwm2m: Clear acknowledged flag before sending separate response
When using a separate response mechanism in LwM2M client, the acknowledged flag is used to notify the engine that the request has been acknowledged already with an empty ack and a separate CON response should be sent. The same flag however is used by the retransmission mechanism, to check if the CON request sent by the client has been acknowledged by the peer. As separate responses use the flag both ways, it has to be cleared before sending the separate CON reply. Otherwise, the retransmission logic assumes the reply has already been acknowledged and skips the retransmission. Signed-off-by: Robert Lubos <[email protected]>
1 parent 9e29c7e commit cf28b5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/net/lib/lwm2m/lwm2m_message_handling.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,7 @@ static int lwm2m_response_promote_to_con(struct lwm2m_message *msg)
26472647

26482648
msg->type = COAP_TYPE_CON;
26492649
msg->mid = coap_next_id();
2650+
msg->acknowledged = false;
26502651

26512652
/* Since the response CoAP packet is already generated at this point,
26522653
* tweak the specific fields manually:

0 commit comments

Comments
 (0)