mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-23 21:43:51 +01:00
Merge pull request #15548 from benpicco/suit/transport/coap_blocksize
suit/transport/coap: make blocksize configurable
This commit is contained in:
commit
1d8c541b32
@ -121,6 +121,13 @@ typedef enum {
|
||||
COAP_BLOCKSIZE_1024,
|
||||
} coap_blksize_t;
|
||||
|
||||
/**
|
||||
* @brief Coap block-wise-transfer size used for SUIT
|
||||
*/
|
||||
#ifndef CONFIG_SUIT_COAP_BLOCKSIZE
|
||||
#define CONFIG_SUIT_COAP_BLOCKSIZE COAP_BLOCKSIZE_64
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Performs a blockwise coap get request to the specified url.
|
||||
*
|
||||
|
||||
@ -358,7 +358,7 @@ static int _dtv_fetch(suit_manifest_t *manifest, int key,
|
||||
if (0) {}
|
||||
#ifdef MODULE_SUIT_TRANSPORT_COAP
|
||||
else if (strncmp(manifest->urlbuf, "coap://", 7) == 0) {
|
||||
res = suit_coap_get_blockwise_url(manifest->urlbuf, COAP_BLOCKSIZE_64,
|
||||
res = suit_coap_get_blockwise_url(manifest->urlbuf, CONFIG_SUIT_COAP_BLOCKSIZE,
|
||||
suit_storage_helper,
|
||||
manifest);
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ ssize_t suit_coap_get_blockwise_url_buf(const char *url,
|
||||
static void _suit_handle_url(const char *url)
|
||||
{
|
||||
LOG_INFO("suit_coap: downloading \"%s\"\n", url);
|
||||
ssize_t size = suit_coap_get_blockwise_url_buf(url, COAP_BLOCKSIZE_64,
|
||||
ssize_t size = suit_coap_get_blockwise_url_buf(url, CONFIG_SUIT_COAP_BLOCKSIZE,
|
||||
_manifest_buf,
|
||||
SUIT_MANIFEST_BUFSIZE);
|
||||
if (size >= 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user