[riot-notifications] [RIOT-OS/RIOT] sys/net/nanocoap: block_finish returns if more are expected (#16704)

Francisco notifications at github.com
Thu Aug 12 16:16:49 CEST 2021


@fjmolinas commented on this pull request.



> @@ -1032,10 +1032,12 @@ void coap_block_finish(coap_block_slicer_t *slicer, uint16_t option)
     uint8_t *pos = slicer->opt + 1;
     uint16_t delta = _decode_value(*slicer->opt >> 4, &pos, slicer->opt + 3);
 
-    uint32_t blkopt = _slicer2blkopt(slicer, slicer->cur > slicer->end);
+    bool more = slicer->cur > slicer->end;

But in that case you would get an extra block, when `slicer->cur` == `slicer->end` we do not want an extra block so the if should return false.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16704#discussion_r687755906
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210812/a8258c23/attachment.htm>


More information about the notifications mailing list