Skip to content
Commit f0212367 authored by Marco Argiolas's avatar Marco Argiolas Committed by Alberto Escolar
Browse files

net: lib: lwm2m: fix formula for expected next block



Block size is a 3-bit value mapping values [0, 6] to powers of 2 in the
range [16, 1024]. Value 7 is invalid.
The previous formula was not working in case the client's preferred size
was 4 (or more) times bigger than the server's.
This commit takes into account also the case the client's preferred size
is smaller than the server's.

Signed-off-by: default avatarMarco Argiolas <marco.argiolas@ftpsolutions.com.au>
parent 43de309b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment