Fix payload transmitted in Block2 transfer.

Previosly the CoAP server transmitted the first block of data for Block2
transfer, even when a client requested in Block2 request following
block. This patch changes server operation to transmit the payload
block requested by the client.

Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Mesure-preliminaire
Hubert Miś 3 years ago
parent 89d51737a9
commit 3dc7e5c8d6

@ -58,7 +58,7 @@ class BlockLayer(object):
del transaction.request.block2
else:
# early negotiation
byte = 0
byte = num * size
self._block2_receive[key_token] = BlockItem(byte, num, m, size)
del transaction.request.block2

Loading…
Cancel
Save