[Spice-devel] [PATCH spice-server] red-stream: Remove AsyncRead::stream

Christophe Fergeau cfergeau at redhat.com
Tue Jan 16 13:07:10 UTC 2018


On Tue, Jan 09, 2018 at 07:48:34PM +0000, Frediano Ziglio wrote:
> AsyncRead is always included in RedStream and there are only
> a possible operation pending on a RedStream.

Yes, it's a bit odd that AsyncRead is attached to RedStream, which means
only one async operation at a time is possible. One could argue it's
better to keep things asthey are now in case we want to make more
extensive use of async operations in the future, but I suspect we'd
have to do more work on RedStream anyway to allow that.

> @@ -550,13 +549,16 @@ void red_stream_async_read(RedStream *stream,
>  {
>      AsyncRead *async = &stream->priv->async_read;
>  
> -    g_return_if_fail(!async->stream);
> -    async->stream = stream;
> +    g_return_if_fail(async->now == NULL && async->end == NULL);

> +    if (size == 0) {
> +        read_done_cb(opaque);
> +        return;
> +    }

This bit seems unrelated?

Apart from this,
Acked-by: Christophe Fergeau <cfergeau at redhat.com>

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180116/bceaff4f/attachment.sig>


More information about the Spice-devel mailing list