samples: net: sockets: coap_server: fix separate response MID reuse
Fixes #71620 by generating a different CoAP message ID for the separate response. Signed-off-by: Julien Vermillard <julien@vermillard.com>
This commit is contained in:
parent
d0be2010c3
commit
ca1705d730
|
@ -57,7 +57,7 @@ static int separate_get(struct coap_resource *resource,
|
|||
/* Re-use the buffer */
|
||||
r = coap_packet_init(&response, data, sizeof(data),
|
||||
COAP_VERSION_1, type, tkl, token,
|
||||
COAP_RESPONSE_CODE_CONTENT, id);
|
||||
COAP_RESPONSE_CODE_CONTENT, coap_next_id());
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue