mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 07:51:19 +01:00
nanocoap: ensure pkt->hdr equals rbuf in coap_build_reply()
This commit is contained in:
parent
d48eaf15aa
commit
ec00a16c57
@ -778,6 +778,9 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
|
||||
ntohs(pkt->hdr->id));
|
||||
len += payload_len;
|
||||
|
||||
/* HACK: many CoAP handlers assume that the pkt buffer is also used for the response */
|
||||
pkt->hdr = (void *)rbuf;
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user