[Spice-devel] [spice v7 1/3] dcc: handle preferred video codec message

Victor Toso lists at victortoso.com
Thu Feb 9 08:01:58 UTC 2017


Hi,

I forgot to reply to

On Thu, Feb 09, 2017 at 08:25:13AM +0100, Victor Toso wrote:
> On Tue, Feb 07, 2017 at 11:41:05AM +0100, Pavel Grunt wrote:
> > > +static int
> > > dcc_handle_preferred_video_codec_type(DisplayChannelClient *dcc,
> > > +         SpiceMsgcDisplayPreferredVideoCodecType *msg)
> > > +{
> > > +    gint i;
> > > +    GArray *client_codecs;
> > > +
> > > +    spice_return_val_if_fail(msg->num_of_codecs > 0, TRUE);
> > > +    spice_return_val_if_fail(msg->num_of_codecs <
> > > SPICE_VIDEO_CODEC_TYPE_ENUM_END, TRUE);
> >
> > I am afraid that spice_return may abort depending on the
> > configuration flags of spice-common.
> >
> > In this case it is not really desired (Client can have newer
> > protocol than the Server) so please use g_return_... Or don't use
> > the "end" condition - it is checked below anyway

True. If SPICE_DISABLE_ABORT is not defined, it should abort on critical
level of warnings (I thought we had removed that in the server too).

I'll switch to g_return_* as it seems safer.

        toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170209/6e340180/attachment.sig>


More information about the Spice-devel mailing list