e_client: send E_EVENT_CLIENT_REMOVE event when an ec is deleted 99/262799/2 accepted/tizen/unified/20210820.101803 submit/tizen/20210820.040607
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 20 Aug 2021 01:18:47 +0000 (10:18 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 20 Aug 2021 02:48:42 +0000 (11:48 +0900)
There was a bug that the E_Process kept the deleted ec pointer (dangling) in the ec_lists.

When the ec which sent E_EVENT_CLIENT_ADD event and set new_client flag to 1 was deleted,
E could not send E_EVENT_CLIENT_REMOVE event because its new_client flag was 1.
By this, e_process didn't get the E_EVENT_CLIENT_REMOVE and didn't remove ec from ec_lists.

This patch resolve this problem.
We change code to send E_EVENT_CLIENT_REMOVE always if E_EVENT_CLIENT_ADD was sent before.

Change-Id: Iac5f683a9fb2aacd897ec07f4b0ab46c5e396d8d

src/bin/e_client.c

index 01d4e8eccb1ed30c2f6a45d76837527d15b4e611..0e82e2a5456d078d99d7a284c1942318475eb7a6 100644 (file)
@@ -1312,18 +1312,7 @@ _e_client_del(E_Client *ec)
    /* must be called before parent/child clear */
    _e_client_hook_call(E_CLIENT_HOOK_DEL, ec);
 
-   if ((!ec->new_client) && (!stopping))
-     {
-        _e_client_event_remove(ec);
-     }
-   else
-     {
-        if (stopping)
-          {
-             ELOGF("COMP", "SEND E_EVENT_CLIENT_REMOVE event on stopping env", ec);
-             _e_client_event_remove(ec);
-          }
-     }
+   _e_client_event_remove(ec);
 
    ELOGF("COMP", "CLIENT DEL", ec);