Skip to content

Commit 252f8fe

Browse files
SeppoTakalokartben
authored andcommitted
net: lwm2m: Fix blockwise Ack NUM calculation
After the PR #85000 the calculation of NUM field of Block 1 option on CoAP Ack packet started to advance to next packet block. We should not update the ctx->current field because it is used for calculating the NUM field in response packet. It should point to beginning of the payload, so the response is correct. Leshan server don't seem to care about this, but Coiote does. Signed-off-by: Seppo Takalo <[email protected]>
1 parent 1a7642b commit 252f8fe

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

subsys/net/lib/lwm2m/lwm2m_message_handling.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,9 +1057,6 @@ static int lwm2m_write_handler_opaque(struct lwm2m_engine_obj_inst *obj_inst,
10571057
return ret;
10581058
}
10591059
}
1060-
if (msg->in.block_ctx && !last_pkt_block) {
1061-
msg->in.block_ctx->ctx.current += len;
1062-
}
10631060
opaque_ctx.offset += len;
10641061
written += len;
10651062
}

0 commit comments

Comments
 (0)