[PATCH 2/2] Pass object ID not pointer when sending a global announce event

Kristian Høgsberg krh at bitplanet.net
Mon Jul 18 10:16:46 PDT 2011


On Mon, Jul 18, 2011 at 2:00 AM, Casey Dahlin <cdahlin at redhat.com> wrote:
> When the type for the first argument of the global event changed from new_id to
> uint, wl_connection_vmarshal started expecting an integer argument rather than
> an object argument. As a result we were sending the client a chunk of pointer
> rather than a useful global identifier.
> ---
>  wayland/wayland-server.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks for catching this.  I fixed this bug several times in previous
versions of the patch, but I ended up comitting it anyway, of
course...

> diff --git a/wayland/wayland-server.c b/wayland/wayland-server.c
> index d4fdfc7..2019cb4 100644
> --- a/wayland/wayland-server.c
> +++ b/wayland/wayland-server.c
> @@ -313,7 +313,7 @@ wl_client_post_global(struct wl_client *client, struct wl_object *object)
>        wl_client_post_event(client,
>                             &client->display->object,
>                             WL_DISPLAY_GLOBAL,
> -                            object,
> +                            object->id,
>                             object->interface->name,
>                             object->interface->version);
>  }
> --
> 1.7.6
>
>


More information about the wayland-devel mailing list