Changes to add caller_pkgname both app and daemon 05/127505/2
authorMyungki Lee <mk5004.lee@samsung.com>
Thu, 27 Apr 2017 12:33:51 +0000 (21:33 +0900)
committerMyungKi Lee <mk5004.lee@samsung.com>
Thu, 27 Apr 2017 12:54:40 +0000 (12:54 +0000)
Change-Id: I873a1223d2689555c12dfda83c0847ee28881503
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification.c

index 6b135cb..b892eb4 100755 (executable)
@@ -1456,14 +1456,13 @@ static notification_h _notification_create(notification_type_e type)
        noti->delete_timeout = 0;
        noti->event_flag = false;
        noti->is_translation = false;
+       noti->caller_pkgname = notification_get_pkgname_by_pid();
+       if (noti->caller_pkgname == NULL) {
+               NOTIFICATION_ERR("get_pkgname_by_pid is failed");
+               goto out;
+       }
 
        if (getuid() >= REGULAR_UID_MIN) {
-               noti->caller_pkgname = notification_get_pkgname_by_pid();
-               if (noti->caller_pkgname == NULL) {
-                       NOTIFICATION_ERR("get_pkgname_by_pid is failed");
-                       goto out;
-               }
-
                err = aul_app_get_pkgid_bypid(getpid(), pkgid, sizeof(pkgid));
                if (err != AUL_R_OK) {
                        NOTIFICATION_ERR("get_pkgid_bypid is failed err[%d]", err);