[Spice-devel] [PATCH spice-gtk 3/5] webdav: don't start client on empty message
Frediano Ziglio
fziglio at redhat.com
Wed Jun 19 10:01:14 UTC 2019
>
> If the client on the remote side disconnects,
> spice-webdav daemon sends a message with no data.
>
> However, if the phodav server already closed
> the client connection, client lookup fails and
> we open a new connection to phodav, but don't write
> anything to it - this should not happen,
> so in such case, ignore the message and start
> demuxing again.
>
> Signed-off-by: Jakub Janků <jjanku at redhat.com>
> ---
> src/channel-webdav.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/channel-webdav.c b/src/channel-webdav.c
> index 822fee0..ea287f1 100644
> --- a/src/channel-webdav.c
> +++ b/src/channel-webdav.c
> @@ -421,8 +421,12 @@ static void data_read_cb(GObject *source_object,
>
> if (client)
> demux_to_client(client);
> - else
> + else if (size > 0)
> start_client(self);
Style: always brackets
> + else {
> + c->demuxing = FALSE;
> + start_demux(self);
> + }
> }
>
>
Otherwise patch is fine.
Frediano
More information about the Spice-devel
mailing list