Skip to content

Commit

Permalink
nanocoap_sock: don't use return buffer for request
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed May 2, 2023
1 parent 7213c0a commit f6f5b13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sys/net/application_layer/nanocoap/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,12 @@ static int _get_put_cb(void *arg, coap_pkt_t *pkt)

ssize_t nanocoap_sock_get(nanocoap_sock_t *sock, const char *path, void *buf, size_t len)
{
uint8_t *pktpos = buf;
/* buffer for CoAP header */
uint8_t buffer[CONFIG_NANOCOAP_BLOCK_HEADER_MAX];
uint8_t *pktpos = buffer;

coap_pkt_t pkt = {
.hdr = buf,
.hdr = (void *)pktpos,
};

struct iovec ctx = {
Expand Down

0 comments on commit f6f5b13

Please # to comment.