[PATH wayland] allow to set server socket dir on a different directory than XDG_RUNTIME_DIR

Jon A. Cruz jonc at osg.samsung.com
Fri Feb 6 15:44:45 PST 2015


LGTM

Reviewed-by: Jon A. Cruz <jonc at osg.samsung.com>


On 02/05/2015 02:14 AM, Bettio, Davide wrote:
> commit 68beb2b60f851c74b982b0a23da4bb1ce375efcf
> Author: Davide Bettio <davide.bettio at ispirata.com>
> Date:   Wed Feb 4 13:46:19 2015 +0100
> 
>     Allow to explicitly set wayland server socket dir using
> WAYLAND_SERVER_SOCKET_DIR
> 
> diff --git a/src/wayland-server.c b/src/wayland-server.c
> index 674aeca..7eaba9e 100644
> --- a/src/wayland-server.c
> +++ b/src/wayland-server.c
> @@ -1080,9 +1080,12 @@ wl_socket_init_for_display_name(struct wl_socket
> *s, const char *name)
>      int name_size;
>      const char *runtime_dir;
> 
> -    runtime_dir = getenv("XDG_RUNTIME_DIR");
> +    runtime_dir = getenv("WAYLAND_SERVER_SOCKET_DIR");
>      if (!runtime_dir) {
> -        wl_log("error: XDG_RUNTIME_DIR not set in the environment\n");
> +        runtime_dir = getenv("XDG_RUNTIME_DIR");
> +    }
> +    if (!runtime_dir) {
> +        wl_log("error: XDG_RUNTIME_DIR or WAYLAND_SERVER_SOCKET_DIR not
> set in the environment\n");
> 
>          /* to prevent programs reporting
>           * "failed to add socket: Success" */
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

-- 
Jon A. Cruz - Senior Open Source Developer
Samsung Open Source Group
jonc at osg.samsung.com


More information about the wayland-devel mailing list