diff mbox

hawkbit: artifact not installed if SWU is not the first

Message ID 1502975227-3112-1-git-send-email-sbabic@denx.de
State Accepted
Delegated to: Stefano Babic
Headers show

Commit Message

Stefano Babic Aug. 17, 2017, 1:07 p.m. UTC
If the Hawkbit server delivers artifacts not in SWU format, SWUpdate
stops. The behaviour is changed and SWUpdate will simply skip all
artifacts that are not SWU images. This avoids that Software is not
installed at all if SWU is not the first artifact in the list provided
by the server.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 suricatta/server_hawkbit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
index 605733f..4603803 100644
--- a/suricatta/server_hawkbit.c
+++ b/suricatta/server_hawkbit.c
@@ -1076,7 +1076,7 @@  server_op_res_t server_process_update_artifact(int action_id,
 		if (endfilename <= 0 ||
 		    strncmp(&s[endfilename], ".swu", 4)) {
 			DEBUG("File '%s' is not a SWU image, skipping", s);
-			goto cleanup;
+			continue;
 		}
 
 		DEBUG("Processing '%s' from '%s'\n",