From: Junghyun Yeon Date: Mon, 30 May 2016 07:06:33 +0000 (+0900) Subject: change process of move request to wait return value X-Git-Tag: accepted/tizen/common/20160610.175907^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e52e30663db1a138b437eb61e533a1e6966a292f;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git change process of move request to wait return value Change-Id: I782e6fad4d4586538f46c4671818b03a5e740ab2 Signed-off-by: Junghyun Yeon --- diff --git a/src/pkg_cmd.c b/src/pkg_cmd.c index ea086ac..2b118eb 100644 --- a/src/pkg_cmd.c +++ b/src/pkg_cmd.c @@ -826,6 +826,8 @@ static int __process_request(uid_t uid) ret = -1; break; } + + main_loop = g_main_loop_new(NULL, FALSE); pc = pkgmgr_client_new(PC_REQUEST); if (pc == NULL) { printf("PkgMgr Client Creation Failed\n"); @@ -838,12 +840,12 @@ static int __process_request(uid_t uid) break; } ret = pkgmgr_client_usr_request_service(PM_REQUEST_MOVE, data.type, pc, - data.pkg_type, data.pkgid, uid, NULL, NULL, NULL); - - printf("pkg[%s] move result = %d\n", data.pkgid, ret); + data.pkg_type, data.pkgid, uid, NULL, __return_cb, NULL); if (ret < 0) break; + + g_main_loop_run(main_loop); ret = data.result; break;