[Spice-devel] [PATCH 06/14] FIXME/HACK: RedPipeItem/VDIPortBuf refcounting hack

Pavel Grunt pgrunt at redhat.com
Fri Apr 8 07:48:32 UTC 2016


Hi,

On Thu, 2016-04-07 at 17:11 -0500, Jonathon Jongsma wrote:
> From: Christophe Fergeau<cfergeau at redhat.com>
> 
> related to 7d375e0
> workaround a runtime check in red_pipe_item_ref()

Should the refcount be initialized by red_pipe_item_init?

Pavel

> ---
>  server/reds.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/server/reds.c b/server/reds.c
> index 64f7df8..bf39cf7 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -752,7 +752,8 @@ static VDIReadBuf
> *vdi_port_get_read_buf(RedCharDeviceVDIPort *dev)
>      buf = SPICE_CONTAINEROF(item, VDIReadBuf, link.parent.link);
>  
>      g_warn_if_fail(buf->link.refcount == 0);
> -    red_pipe_item_ref(buf);
> +    buf->link.refcount = 1;
> +    //red_pipe_item_ref(buf);
>  
>      return buf;
>  }


More information about the Spice-devel mailing list