Skip to content

Commit 1c9b17f

Browse files
committed
nanocoap_fileserver: adjust pkt length if CoAP header shrunk
1 parent d1f60d7 commit 1c9b17f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/net/application_layer/nanocoap/fileserver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static ssize_t _get_file(coap_pkt_t *pdu, uint8_t *buf, size_t len,
269269
vfs_close(fd);
270270

271271
slicer.cur = slicer.end + more;
272-
coap_block2_finish(&slicer);
272+
resp_len -= coap_block2_finish(&slicer);
273273

274274
if (read == 0) {
275275
/* Rewind to clear payload marker */

0 commit comments

Comments
 (0)