e_tizen_embedded_compositor: add logs for binding/sending sock_fd to client(s) 48/229848/1 tizen_5.5_tv
authorSung-Jin Park <sj76.park@samsung.com>
Fri, 3 Apr 2020 04:42:41 +0000 (13:42 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 6 Apr 2020 04:00:13 +0000 (04:00 +0000)
Change-Id: I745ecca79fdc6fd212b0ce78f4f5cdf28d4e9787
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
(cherry picked from commit 49282acd17698ee4c00c22b147b11d8e6a71c6fe)

src/e_devicemgr_embedded_compositor.c

index 99ab09d8fffd58d91fd9f17c3052faab78e61170..5ce0f7bf024de0f8d3e5879bd3c769cd8836d21a 100644 (file)
@@ -20,15 +20,20 @@ _e_tizen_embedded_compositor_cb_get_socket(struct wl_client *client,
                           struct wl_resource *resource)
 {
    int sock_fd=-1;
+   pid_t pid = 0;
+
+   wl_client_get_credentials(client, &pid, NULL, NULL);
 
    sock_fd = socket(PF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
    if (sock_fd < 0)
      {
-        ERR("Could not create socket: %m");
+        ERR("Could not create socket: %m, (client=%p, pid=%d)\n", client, pid);
         return;
      }
 
    tizen_embedded_compositor_send_socket(resource, sock_fd);
+
+   INF("[%s] sock_fd(=%d) sent! (client=%p, pid=%d)\n", __FUNCTION__, sock_fd, client, pid);
    close(sock_fd);
 }
 
@@ -49,10 +54,12 @@ static void
 _e_tizen_embedded_compositor_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 {
    struct wl_resource *res;
+   pid_t pid = 0;
 
    if (!(res = wl_resource_create(client, &tizen_embedded_compositor_interface, MIN(version, 1), id)))
      {
-        ERR("Could not create tizen_video_interface resource: %m");
+        wl_client_get_credentials(client, &pid, NULL, NULL);
+        ERR("Could not create tizen_video_interface resource: %m, (client=%p, pid=%d)\n", client, pid);
         wl_client_post_no_memory(client);
         return;
      }