[Spice-devel] [client 1/2] streaming: Send a special stream report to signal streaming errors

Christophe Fergeau cfergeau at redhat.com
Thu Sep 1 13:27:23 UTC 2016


On Thu, Aug 11, 2016 at 01:04:09PM +0200, Francois Gouget wrote:
> Servers that recognize this special report then stop streaming (sending 
> regular screen updates instead) while older ones essentially ignore it.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> 
> This patchset is based on Victor Toso's idea [1] of using the stream 
> reports to tell the server that, despite expectations, the client cannot 
> handle a given stream.
> 
> You'll notice that this patch does not directly check for 
> create_xxx_decoder() errors. Instead it relies on the previous patchset 
> [2] deleting broken streams so that the following messages will run into 
> an unknown stream.

I can't help but wonder why it's better this way? Is it so that you can
reuse the stream report code as mentioned below?

> 
> Of course this could already happen in case of a malicious server 
> sending garbage to the client. So this patchset is quite independent 
> from the previous one.
> 
> I don't know what the consequences of receiving an unknown message would 
> be for the server so I chose to hook into the 
> display_handle_stream_activate_report() as that's where we get notified 
> that the server supports the stream reports.

Have you considered using a dedicated client -> server message for that
rather than using magic values in a stream report message?

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


More information about the Spice-devel mailing list