Revert "e_devicemgr: Do not send device_remove event if no object found by id in... 72/313572/1
authorduna.oh <duna.oh@samsung.com>
Fri, 28 Jun 2024 01:48:14 +0000 (10:48 +0900)
committerduna.oh <duna.oh@samsung.com>
Fri, 28 Jun 2024 01:49:15 +0000 (10:49 +0900)
It is better not to use wl_client_get_object() APIs for thread safety.

This reverts commit d2df60e1e8d4dd4aee54dc40754f01b318a1a69f.

Change-Id: I05c7e40e43a90b6977ae57a71400c31b66434b0c

src/bin/e_devicemgr_wl.c

index 429d576..440a460 100644 (file)
@@ -193,8 +193,7 @@ void
 e_devicemgr_wl_device_del(E_Devicemgr_Input_Device *dev)
 {
    struct wl_resource *res;
-   struct wl_client *wc;
-   uint32_t serial, res_id;
+   uint32_t serial;
    E_Devicemgr_Input_Device_User_Data *device_user_data;
 
    serial = wl_display_next_serial(e_comp_wl->wl.disp);
@@ -202,24 +201,11 @@ e_devicemgr_wl_device_del(E_Devicemgr_Input_Device *dev)
    EINA_LIST_FREE(dev->resources, res)
      {
         device_user_data = wl_resource_get_user_data(res);
-
         if (!device_user_data) continue;
         if (!device_user_data->dev_mgr_res || !device_user_data->seat_res ||
             !device_user_data->dev_res)
           continue;
 
-        res_id = wl_resource_get_id(res);
-        wc = wl_resource_get_client(res);
-        if (wl_client_get_object(wc, res_id) != res)
-          {
-             pid_t pid;
-             wl_client_get_credentials(wc, &pid, NULL, NULL);
-
-             DMERR("No device_remove sent: PID@%d id@%u path:%s",
-                   pid, res_id, dev->identifier);
-             continue;
-          }
-
         device_user_data->dev = NULL;
         tizen_input_device_manager_send_device_remove(
                                    device_user_data->dev_mgr_res,