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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi

On Wed, Dec 16, 2015 at 4:03 PM, Frediano Ziglio <fziglio@xxxxxxxxxx> 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@xxxxxxxxxx>

Frediano

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]