Merge pull request #801 from mrdeep1/request_overlap

block.c: Do not match large response if no Block2 option in request
This commit is contained in:
obgm authored and GitHub committed 2021-12-22 12:02:27 +01:00
commit 470f36b45e
1 file changed
+3 -3
+3 -3
View File
@@ -992,9 +992,9 @@ coap_handle_request_send_block(coap_session_t *session,
uint32_t out_blocks[1];
const char *error_phrase;
if (coap_get_block(pdu, COAP_OPTION_BLOCK2, &block)) {
block_opt = COAP_OPTION_BLOCK2;
}
if (!coap_get_block(pdu, COAP_OPTION_BLOCK2, &block))
return 0;
block_opt = COAP_OPTION_BLOCK2;
LL_FOREACH(session->lg_xmit, p) {
size_t chunk;
coap_opt_iterator_t opt_iter;