[Spice-devel] [spice-server PATCH v2] dcc: Don't disconnect channel, when compression is not supported
Frediano Ziglio
fziglio at redhat.com
Wed Dec 16 08:06:39 PST 2015
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151216/fa8661d4/attachment.html>
More information about the Spice-devel
mailing list