[Spice-devel] [PATCH spice-server 4/4] Provide and reuse default implementation for config_socket
Christophe Fergeau
cfergeau at redhat.com
Wed Feb 15 09:15:48 UTC 2017
On Tue, Feb 14, 2017 at 03:55:25PM +0100, Christophe Fergeau wrote:
> I would not provide any default implementation, and just change
> red_channel_config_socket to
>
Thinking more about this, I actually would provide a default
implementation, and move the setsockopt/fnctl code from
reds_init_client_connection() in the default implementation, and make
sure the child classes properly chain up to it (or call it directly if
chaining up is complicated)
Christophe
>
> @@ -739,6 +739,10 @@ int red_channel_config_socket(RedChannel *self, RedChannelClient *rcc)
> {
> RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
>
> + if (!klass->config_socket) {
> + return TRUE;
> + }
> +
> return klass->config_socket(rcc);
> }
>
> If you prefer to provide an empty stub as the default impl, I'd name it
> red_channel_client_default_config_socket()
>
> Reviewed-by: Christophe Fergeau <cfergeau at redhat.com>
>
> Christophe
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- 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/20170215/8eb0200b/attachment.sig>
More information about the Spice-devel
mailing list