From f95d577245e393f05bc92ea191d478bfd9ce3220 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 3 Sep 2022 23:22:31 +0200 Subject: [PATCH] suit: make use of worker functions --- examples/suit_update/main.c | 6 +++--- sys/shell/commands/sc_suit.c | 2 +- sys/suit/transport/coap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/suit_update/main.c b/examples/suit_update/main.c index 21f2569c63..7849df7ae4 100644 --- a/examples/suit_update/main.c +++ b/examples/suit_update/main.c @@ -83,7 +83,7 @@ static void cb(void *arg) { (void) arg; printf("Button pressed! Triggering suit update! \n"); - suit_coap_trigger((uint8_t *) SUIT_MANIFEST_RESOURCE, sizeof(SUIT_MANIFEST_RESOURCE)); + suit_worker_trigger(SUIT_MANIFEST_RESOURCE, sizeof(SUIT_MANIFEST_RESOURCE)); } #endif @@ -211,8 +211,8 @@ int main(void) #endif /* initialize suit storage */ suit_storage_init_all(); - /* start suit coap updater thread */ - suit_coap_run(); + /* start suit updater thread */ + suit_worker_run(); /* start nanocoap server thread */ thread_create(_nanocoap_server_stack, sizeof(_nanocoap_server_stack), diff --git a/sys/shell/commands/sc_suit.c b/sys/shell/commands/sc_suit.c index b38dc931df..9d74bddc1f 100644 --- a/sys/shell/commands/sc_suit.c +++ b/sys/shell/commands/sc_suit.c @@ -40,7 +40,7 @@ static int _suit_handler(int argc, char **argv) } if (strcmp(argv[1], "fetch") == 0) { - suit_coap_trigger((uint8_t *)argv[2], strlen(argv[2])); + suit_worker_trigger(argv[2], strlen(argv[2])); } else if (strcmp(argv[1], "seq_no") == 0) { uint32_t seq_no = 0; diff --git a/sys/suit/transport/coap.c b/sys/suit/transport/coap.c index 0ef417844c..81d3bb8dc0 100644 --- a/sys/suit/transport/coap.c +++ b/sys/suit/transport/coap.c @@ -53,7 +53,7 @@ static ssize_t _trigger_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len, else { code = COAP_CODE_CREATED; LOG_INFO("suit: received URL: \"%s\"\n", (char *)pkt->payload); - suit_coap_trigger(pkt->payload, payload_len); + suit_worker_trigger((char *)pkt->payload, payload_len); } } else {