Skip to content

Commit

Permalink
suit: make use of worker functions
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Sep 3, 2022
1 parent 1996135 commit 443a08d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/suit_update/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion sys/shell/commands/sc_suit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sys/suit/transport/coap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 443a08d

Please # to comment.