Changes to add caller_pkgname both app and daemon 07/127507/1
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 13:05:02 +0000 (22:05 +0900)
Change-Id: I873a1223d2689555c12dfda83c0847ee28881503
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/notification.c

index 407a2ff..deb72af 100755 (executable)
@@ -1447,14 +1447,13 @@ static notification_h _notification_create(notification_type_e type)
        noti->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);