Change not to store pkg id for web app
authorSukhyungKang <shine.kang@samsung.com>
Tue, 23 Nov 2021 01:19:27 +0000 (10:19 +0900)
committerSukhyungKang <shine.kang@samsung.com>
Tue, 23 Nov 2021 04:50:51 +0000 (13:50 +0900)
Change-Id: I025e222d20c05b53d82ae432df68c2bddd58e7f7
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
notification/src/notification.c

index 6f4b526..04b0063 100644 (file)
@@ -1516,17 +1516,17 @@ static notification_h _notification_create(notification_type_e type)
        } else {
                if (_pkg_id == NULL) {
                        err = aul_app_get_pkgid_bypid(getpid(), pkg_id, sizeof(pkg_id));
-                       if (err != AUL_R_OK)
+                       if (err != AUL_R_OK) {
                                noti->pkg_id = strdup(noti->caller_app_id);
-                       else
+                       } else {
                                noti->pkg_id = strdup(pkg_id);
+                               _pkg_id = strdup(pkg_id);
+                       }
 
                        if (noti->pkg_id == NULL) {
                                err = -1;
                                goto out;
                        }
-
-                       _pkg_id = strdup(noti->pkg_id);
                } else {
                        noti->pkg_id = strdup(_pkg_id);
                }