[Spice-devel] [PATCH spice-gtk] windows: initialize co->ret to not randomly release fiber

Marc-André Lureau marcandre.lureau at gmail.com
Thu Dec 15 01:17:20 PST 2011


Hi

On Thu, Dec 15, 2011 at 10:13 AM, Christophe Fergeau <cfergeau at redhat.com>wrote:

> Hey,
>
> When is it triggered exactly? On reconnect? The coroutine structure is
> stored in SpiceChannelPrivate which means it's initially 0'ed out, and this
> should be 0 when coroutine_init is first called. If this co->ret = 0; is
> there to handle subsequent calls to coroutine_init, it might be better to
> memset the whole struct coroutine on disconnect (or whatever place is
> appropriate), or to do 0 out the whole structure first thing in all the
> coroutine implementations.
>
> Dunno if that makes sense or if I missed something though :)
>
>
Correct, it happens on reconnect, reusing the same channel.

I prefer initialization of this value where the fiber is initialized. But
your proposed solutions would work too.

-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20111215/8b65027b/attachment.htm>


More information about the Spice-devel mailing list