mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
examples/nanocoap: use refactored block control function
This commit is contained in:
parent
9dce54b54b
commit
582db9f9fb
@ -148,7 +148,9 @@ ssize_t _sha256_handler(coap_pkt_t* pkt, uint8_t *buf, size_t len, void *context
|
||||
|
||||
ssize_t reply_len = coap_build_reply(pkt, result, buf, len, 0);
|
||||
uint8_t *pkt_pos = (uint8_t*)pkt->hdr + reply_len;
|
||||
pkt_pos += coap_put_block1_ok(pkt_pos, &block1, 0);
|
||||
if (blockwise) {
|
||||
pkt_pos += coap_opt_put_block1_control(pkt_pos, 0, &block1);
|
||||
}
|
||||
if (result_len) {
|
||||
*pkt_pos++ = 0xFF;
|
||||
pkt_pos += fmt_bytes_hex((char *)pkt_pos, digest, sizeof(digest));
|
||||
|
Loading…
Reference in New Issue
Block a user