Fix file testing 68/86768/2
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 2 Sep 2016 16:38:59 +0000 (18:38 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 2 Sep 2016 16:53:58 +0000 (18:53 +0200)
Change-Id: Ide8250910005c37a6ecadcb81d4d3b8e1e646bda
Reported-by: Tomasz Wozniak <t.wozniak@samsung.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
libthor/thor.c
lthor.c

index 4ab42a28851c5c74bd201b41614c8c91ef8e12b1..5a5172762854dbdf597d9bbde4992c5013b6fbcb 100644 (file)
@@ -464,6 +464,9 @@ int thor_send_data(thor_device_handle *th, struct thor_data_src *data,
                int_data[0] = type;
                int_data[1] = filesize;
 
+               if (!th)
+                       continue;
+
                ret = t_thor_exec_cmd_full(th, RQT_DL, RQT_DL_FILE_INFO,
                                           int_data, ARRAY_SIZE(int_data),
                                           (char **)&filename, 1, &resp);
diff --git a/lthor.c b/lthor.c
index 03ee33eb5285900c4eeb7a87bf150ae24ddaee21..a7240b411999c8e7a2cf444587a4b40aa032c65c 100644 (file)
--- a/lthor.c
+++ b/lthor.c
@@ -63,6 +63,8 @@ static int test_tar_file_list(char **tarfilelist)
                thor_release_data_src(data);
                if (ret)
                        goto error;
+
+               ++tarfilelist;
        }
 
        return 0;