mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-12 11:40:39 +03:00
Do not restrict writing of block option to Block2, only.
Note that coap_write_block_opt() is not very useful for Block1 as it sets the M bit according to the data length and block number.
This commit is contained in:
1 parent
37699fd058
commit
1b3aa704e6
1 file changed
-6
@@ -64,12 +64,6 @@ coap_write_block_opt(coap_block_t *block, unsigned short type,
|
||||
|
||||
assert(pdu);
|
||||
|
||||
/* Block2 */
|
||||
if (type != COAP_OPTION_BLOCK2) {
|
||||
warn("coap_write_block_opt: skipped unknown option\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
start = block->num << (block->szx + 4);
|
||||
if (data_length <= start) {
|
||||
debug("illegal block requested\n");
|
||||
|
||||
Reference in new issue
Block a user