[Spice-devel] [PATCH 16/24] server/red_channel: red_channel_event: push on blocked

Marc-André Lureau marcandre.lureau at gmail.com
Wed Feb 2 10:52:27 PST 2011


ack

I certainly don't understand well the reason either. But it doesn't
seem to make any harm. And the printf message should help us to
understand better later.

Probably, it is related to the window handling in some way.. It could
certainly be improved or documented, the day someone figures it out.

On Wed, Jan 19, 2011 at 7:08 PM, Alon Levy <alevy at redhat.com> wrote:
> try to push either on signal (write available) or when blocked
> and read signaled. From red_worker, copied for compatibility when
> switching later to RedChannel in red_worker. Doesn't make a lot of
> sense (but works), see comment in patch.
> ---
>  server/red_channel.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/server/red_channel.c b/server/red_channel.c
> index be44995..45e4b0a 100644
> --- a/server/red_channel.c
> +++ b/server/red_channel.c
> @@ -424,7 +424,12 @@ static void red_channel_event(int fd, int event, void *data)
>     if (event & SPICE_WATCH_EVENT_READ) {
>         red_channel_receive(channel);
>     }
> -    if (event & SPICE_WATCH_EVENT_WRITE) {
> +    // TODO: || channel->send_data.blocked ? (from red_worker. doesn't really make sense if we have an event
> +    // fired in that case)
> +    if (event & SPICE_WATCH_EVENT_WRITE || channel->send_data.blocked) {
> +        if (channel->send_data.blocked && ! (event & SPICE_WATCH_EVENT_WRITE)) {
> +            red_printf("pushing because of blocked");
> +        }
>         red_channel_push(channel);
>     }
>  }
> --
> 1.7.3.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau


More information about the Spice-devel mailing list