From e52e30663db1a138b437eb61e533a1e6966a292f Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Mon, 30 May 2016 16:06:33 +0900 Subject: [PATCH] change process of move request to wait return value Change-Id: I782e6fad4d4586538f46c4671818b03a5e740ab2 Signed-off-by: Junghyun Yeon --- src/pkg_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.7.4