[PATCH] ivi-controller: Send process ID that created surface to client

Natsume, Wataru (ADITJ/SWG) wnatsume at jp.adit-jv.com
Thu Mar 10 19:57:01 EST 2016


createPid should be a pid of process that creates surface.

Signed-off-by: Wataru Natsume <wnatsume at jp.adit-jv.com>
---
 weston-ivi-shell/src/ivi-controller-impl.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c
index 235aacd..7fe0f2d 100644
--- a/weston-ivi-shell/src/ivi-controller-impl.c
+++ b/weston-ivi-shell/src/ivi-controller-impl.c
@@ -614,10 +614,18 @@ controller_surface_send_stats(struct wl_client *client,
                               struct wl_resource *resource)
 {
     struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
+    struct weston_surface *surface;
+    struct wl_client* target_client;
     pid_t pid;
     uid_t uid;
     gid_t gid;
-    wl_client_get_credentials(client, &pid, &uid, &gid);
+
+    /* Get pid that creates surface */
+    surface = ivi_extension_surface_get_weston_surface(ivisurf->shell,
+                                                       ivisurf->layout_surface);
+    target_client = wl_resource_get_client(surface->resource);
+
+    wl_client_get_credentials(target_client, &pid, &uid, &gid);
 
     ivi_controller_surface_send_stats(resource, 0, 0,
                                       ivisurf->update_count, pid, "");
-- 
1.9.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Send-process-ID-that-created-surface-to-client.patch
Type: application/octet-stream
Size: 1558 bytes
Desc: 0001-Send-process-ID-that-created-surface-to-client.patch
URL: <http://lists.genivi.org/pipermail/genivi-ivi-layer-management_lists.genivi.org/attachments/20160311/b8b6293d/attachment.patch>


More information about the genivi-ivi-layer-management mailing list