[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:09:06 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.
> 
> 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.
> 
> Maybe we should send such an error anywhere we receive a message with an 
> unknown stream_id. There's really no reason for that to happen in those 
> other places though, except if the server does not recognize the initial 
> error stream report and continues streaming. In that case sending more 
> error messages won't do any good. So sending an error in just this one 
> place may make more sense.
> 
> We could also add an extra cap to identify servers that recognize this 
> special type or stream report. But is it really worth it?

Part of this + some bits from
https://lists.freedesktop.org/archives/spice-devel/2016-August/031445.html
really belongs to the commit log. We want to have an explanation *why*
we want this in the commit log, very useful when looking back at the code 2
years later and wondering why this code was added.

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/3557bd40/attachment.sig>


More information about the Spice-devel mailing list