Set pkg_id to caller_app_id if can't get pkg_id 77/139177/3
authorMyungki Lee <mk5004.lee@samsung.com>
Mon, 17 Jul 2017 23:51:53 +0000 (08:51 +0900)
committerMyungKi Lee <mk5004.lee@samsung.com>
Tue, 18 Jul 2017 11:29:26 +0000 (11:29 +0000)
- in notification_crete func

Change-Id: I329c0eee88377dac2df2c5d7e25f06a8bfc33665
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification.c

index 33955c9..9ed7016 100755 (executable)
@@ -1483,11 +1483,10 @@ static notification_h _notification_create(notification_type_e type)
                noti->pkg_id = strdup(noti->caller_app_id);
        } else {
                err = aul_app_get_pkgid_bypid(getpid(), pkg_id, sizeof(pkg_id));
-               if (err != AUL_R_OK) {
-                       NOTIFICATION_ERR("get_pkgid_bypid is failed err[%d]", err);
-                       goto out;
-               }
-               noti->pkg_id = strdup(pkg_id);
+               if (err != AUL_R_OK)
+                       noti->pkg_id = strdup(noti->caller_app_id);
+               else
+                       noti->pkg_id = strdup(pkg_id);
 
                err = _notification_get_app_name(pkg_id, &domain_name);
                if (err != 0 || domain_name == NULL) {