Skip to content

Commit 3cc50ab

Browse files
committed
nanocoap: Default the blocksize2 to the configured value
1 parent 97926b2 commit 3cc50ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sys/net/application_layer/nanocoap/nanocoap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,8 @@ void coap_block2_init(coap_pkt_t *pkt, coap_block_slicer_t *slicer)
14261426
if (CONFIG_NANOCOAP_BLOCK_SIZE_EXP_MAX - 4 < szx) {
14271427
szx = CONFIG_NANOCOAP_BLOCK_SIZE_EXP_MAX - 4;
14281428
}
1429+
} else {
1430+
szx = CONFIG_NANOCOAP_BLOCK_SIZE_EXP_MAX - 4;
14291431
}
14301432

14311433
coap_block_slicer_init(slicer, blknum, coap_szx2size(szx));

0 commit comments

Comments
 (0)