From 2c67debf2451d5a6bbe74a7a68497fe7ba832d72 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 8 Dec 2016 16:40:53 +0900 Subject: [PATCH] Fix app/pkg event callback - App/Pkg event callback will be invoked only when app/pkg event has happened Change-Id: I3fc7b226be209389ec45490f03c756a954e3c90f Signed-off-by: Junghyun Yeon --- client/src/pkgmgr_client_connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pkgmgr_client_connection.c b/client/src/pkgmgr_client_connection.c index 16454cf..d7201fb 100644 --- a/client/src/pkgmgr_client_connection.c +++ b/client/src/pkgmgr_client_connection.c @@ -214,10 +214,10 @@ static void __signal_handler(GDBusConnection *conn, const gchar *sender_name, } /* each cb_data can only has one callback */ - if (cb_info->event_cb) + if (cb_info->event_cb && strcmp(appid, "") == 0) cb_info->event_cb(target_uid, cb_info->req_id, pkg_type, pkgid, key, val, NULL, cb_info->data); - else if (cb_info->app_event_cb) + else if (cb_info->app_event_cb && strcmp(appid, "") != 0) cb_info->app_event_cb(target_uid, cb_info->req_id, pkg_type, pkgid, appid, key, val, NULL, cb_info->data); -- 2.34.1