From: Jeonghoon Park Date: Fri, 20 Apr 2018 04:05:38 +0000 (+0900) Subject: adds excetion handling for getting metadata failed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F176557%2F2;p=apps%2Fnative%2Fttsd-worker-package.git adds excetion handling for getting metadata failed Change-Id: I0b5491b7aeee53319a49bb77806c614cdc06a5c5 --- diff --git a/src/pm_worker.c b/src/pm_worker.c index 99eb4bc..1e4a8a0 100644 --- a/src/pm_worker.c +++ b/src/pm_worker.c @@ -65,6 +65,13 @@ static void service_app_control(app_control_h app_control, void *data) data_path = app_get_data_path(); metadata = pm_downloader_get_metadata(TEST_URL); + if (!metadata) { + result_str = pm_result_get_install(TEST_URL, false, "GET_META_FAILED"); + pm_worker_report_result(result_str); + service_app_exit(); + return; + } + downloaded_pkg = pm_downloader_download(metadata->url, metadata->file_name, data_path); free(data_path);