Skip to content

Commit 22fc207

Browse files
committed
gateway: fix block_alloc() prototype
block_alloc() declaration was different from its definition, resulting in passing incorrect timeout. Fix that now. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
1 parent 79e626c commit 22fc207

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

gateway/src/block.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <zephyr/kernel.h>
1414
#include <zephyr/sys/sflist.h>
1515

16+
#include "block.h"
17+
1618
enum block_flags
1719
{
1820
BLOCK_LAST = 0,

gateway/src/block.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
struct block;
1212

13-
struct block *block_alloc(void *user_data, size_t size, k_timeout_t timeout);
13+
struct block *block_alloc(void *user_data, k_timeout_t timeout);
1414
void block_free(struct block *block);
1515
size_t block_length(const struct block *block);
1616
void block_mark_last(struct block *block);

gateway/src/downlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ enum golioth_status downlink_block_cb(const uint8_t *data, size_t len, bool is_l
6060
return GOLIOTH_ERR_NACK;
6161
}
6262

63-
struct block *block = block_alloc(NULL, len, K_SECONDS(CONFIG_GATEWAY_DOWNLINK_BLOCK_TIMEOUT));
63+
struct block *block = block_alloc(NULL, K_SECONDS(CONFIG_GATEWAY_DOWNLINK_BLOCK_TIMEOUT));
6464
if (NULL == block)
6565
{
6666
LOG_ERR("Failed to allocate block");

0 commit comments

Comments
 (0)