e_policy_wl: remove appinfo when unbind tzpol and tzlaunch_appinfo 98/235598/2
authorJunseok, Kim <juns.kim@samsung.com>
Mon, 8 Jun 2020 04:03:48 +0000 (13:03 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Mon, 8 Jun 2020 04:58:18 +0000 (13:58 +0900)
Change-Id: I4c2eefd401196cdcca9184f0b9e0220a3cde7e82
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_policy_wl.c

index d554bb625f2d7e16f80bb3d662642a730c5bb18e..85a9e624cd39163acd78ee3d97aa8d804612b03a 100644 (file)
@@ -3388,6 +3388,13 @@ static void
 _tzpol_cb_unbind(struct wl_resource *res_tzpol)
 {
    E_Policy_Wl_Tzpol *tzpol;
+   E_Policy_Appinfo *epai = NULL;
+   pid_t pid = -1;
+
+   wl_client_get_credentials(wl_resource_get_client(res_tzpol), &pid, NULL, NULL);
+   epai = e_policy_appinfo_find_with_pid(pid);
+   if (epai)
+     e_policy_appinfo_del(epai);
 
    tzpol = _e_policy_wl_tzpol_get(res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(tzpol);
@@ -6838,6 +6845,13 @@ _tzlaunch_appinfo_cb_unbind(struct wl_resource *res_tzlaunch_appinfo)
 {
    E_Policy_Wl_Tzlaunch_Appinfo *tzlaunch_appinfo= NULL;
    Eina_List *l, *ll;
+   E_Policy_Appinfo *epai = NULL;
+   pid_t pid = -1;
+
+   wl_client_get_credentials(wl_resource_get_client(res_tzlaunch_appinfo), &pid, NULL, NULL);
+   epai = e_policy_appinfo_find_with_pid(pid);
+   if (epai)
+     e_policy_appinfo_del(epai);
 
    EINA_LIST_FOREACH_SAFE(polwl->tzlaunch_appinfo, l, ll, tzlaunch_appinfo)
      {