From 1b3aa704e61c1d7d77f57fef9c653debb556b27e Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Thu, 6 Mar 2014 15:43:00 +0000 Subject: [PATCH] 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. --- block.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block.c b/block.c index 847fe9cc..aaea2b31 100644 --- a/block.c +++ b/block.c @@ -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");