Skip to content

Commit 4655ef3

Browse files
maass-hamburgfabiobaltieri
authored andcommitted
mgmt: hawkbit: also use workqueue for shell run
Also use a workqueue, when execution of hawkBit is requested via shell. Signed-off-by: Fin Maaß <[email protected]>
1 parent 6cc2bb5 commit 4655ef3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subsys/mgmt/hawkbit/shell.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ static void cmd_run(const struct shell *sh, size_t argc, char **argv)
2020

2121

2222
shell_info(sh, "Starting hawkBit run...");
23-
switch (hawkbit_probe()) {
23+
hawkbit_autohandler(false);
24+
25+
switch (hawkbit_autohandler_wait(UINT32_MAX, K_FOREVER)) {
2426
case HAWKBIT_UNCONFIRMED_IMAGE:
2527
shell_error(sh, "Image is unconfirmed."
2628
"Rebooting to revert back to previous confirmed image");
@@ -40,7 +42,6 @@ static void cmd_run(const struct shell *sh, size_t argc, char **argv)
4042

4143
case HAWKBIT_UPDATE_INSTALLED:
4244
shell_info(sh, "Update installed");
43-
hawkbit_reboot();
4445
break;
4546

4647
case HAWKBIT_DOWNLOAD_ERROR:

0 commit comments

Comments
 (0)