thor: Send nack for unmatched filename 60/297760/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 24 Aug 2023 00:51:33 +0000 (09:51 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 24 Aug 2023 02:29:49 +0000 (11:29 +0900)
Send nack with error value for not found matched filename from
dfu list. Otherwise, lthor will send next requests for the file.

Change-Id: I9e2b1c2eb18d80cda6464ffa16e2f5ba482635ad
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/thor.c

index 8aa7d61..228e1cc 100644 (file)
@@ -265,7 +265,7 @@ static int thor_process_rqt_download(struct thor_context *tctx)
                e = dfu_start(dfu, file_size, f_name);
                if (!e) {
                        fprintf(stderr, "failed to start dfu\n");
-                       ret = -EINVAL;
+                       ret = rsp.ack = -EINVAL;
                }
 
                tctx->dfu_entry = e;