[Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported

Victor Toso lists at victortoso.com
Thu Dec 17 03:34:44 PST 2015


Hi,

On Wed, Dec 16, 2015 at 11:06:39AM -0500, Frediano Ziglio wrote:
> > Hi
> 
> > On Wed, Dec 16, 2015 at 4:03 PM, Frediano Ziglio < fziglio at redhat.com >
> > wrote:
> 
> > > So mainly this function has to return always TRUE (success).
> > 
> 
> > > Why not ignoring the return value?
> > 
> > > Or returning void?
> > 
> 
> > > Frediano
> > 
> 
> > The function that calls this one (dcc_handle_message()) looks like this:
> 
> > switch (type) {
> > case SPICE_MSGC_DISPLAY_INIT:
> > return dcc_handle_init(dcc, (SpiceMsgcDisplayInit *)msg);
> > case SPICE_MSGC_DISPLAY_STREAM_REPORT:
> > return dcc_handle_stream_report(dcc, (SpiceMsgcDisplayStreamReport *)msg);
> > case SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION:
> > return dcc_handle_preferred_compression(dcc,
> > (SpiceMsgcDisplayPreferredCompression *)msg);
> > default:
> > return red_channel_client_handle_message(rcc, size, type, msg);
> > }
> 
> > Always returning TRUE is the same, as removing the return from case
> > SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION, and return TRUE at the end of this
> > function.
> 
> > Always returning TRUE seems nicer to me, because it doesn't break the
> > symmetry in the switch.
> > --
> > Lukas Venhoda
>
> Sounds reasonable 
>
> Acked-by: Frediano Ziglio <fziglio at redhat.com> 
>
> Frediano

Merged!


More information about the Spice-devel mailing list