- verity-handler always use 45 seconds though hash is not made
- To prevent this situation, cancel progress thread after
hash thread is terminated
Change-Id: Ie31f259e0270874128a98c16ae81e1cd7f8d2b81
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
for (int tick = 0; tick < count; tick++) {
fota_gui_update_progress((int)progress);
progress += progress_increment;
+ pthread_testcancel();
usleep(period);
}
} else
LOG("pthread_join(th_id_hash) succeeded \n");
+ error = pthread_cancel(th_id_progress);
+ if (error != 0) {
+ LOG("progress thread is already terminated \n");
+
error = pthread_join(th_id_progress, NULL);
if (error != 0) {
LOG("pthread_join(th_id_progress) failed (err = %d)\n", error);