Fix app/pkg event callback 85/103385/2 accepted/tizen/3.0/common/20161212.060259 accepted/tizen/3.0/common/20161216.122513 accepted/tizen/3.0/ivi/20161212.022740 accepted/tizen/3.0/ivi/20161216.013348 accepted/tizen/3.0/mobile/20161212.022442 accepted/tizen/3.0/mobile/20161216.013211 accepted/tizen/3.0/tv/20161212.022637 accepted/tizen/3.0/tv/20161216.013256 accepted/tizen/3.0/wearable/20161212.022710 accepted/tizen/3.0/wearable/20161216.013319 submit/tizen_3.0/20161209.072525 submit/tizen_3.0/20161214.072903
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 8 Dec 2016 07:40:53 +0000 (16:40 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Thu, 8 Dec 2016 11:59:58 +0000 (03:59 -0800)
- App/Pkg event callback will be invoked only when
app/pkg event has happened

Change-Id: I3fc7b226be209389ec45490f03c756a954e3c90f
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
client/src/pkgmgr_client_connection.c

index 16454cf..d7201fb 100644 (file)
@@ -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);