[Spice-devel] [PATCH] Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUP

Marc-André Lureau mlureau at redhat.com
Tue Feb 7 08:48:21 PST 2012


ack, (will push if you don't have commit access)

----- Mensaje original -----
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> If connecting to a UNIX domain socket, it is expected that the
> setsockopt(TCP_NDELAY) call will fail with errno=ENOTSUP, so don't
> issue a warning in that case
> ---
>  gtk/spice-channel.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index bdfb02b..e4d041e 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -2193,7 +2193,7 @@ ssl_reconnect:
>  connected:
>      rc = setsockopt(g_socket_get_fd(c->sock), IPPROTO_TCP,
>      TCP_NODELAY,
>                      (const char*)&delay_val, sizeof(delay_val));
> -    if (rc != 0) {
> +    if (rc != 0 && errno != ENOTSUP) {
>          g_warning("%s: could not set sockopt TCP_NODELAY: %s",
>          c->name,
>                    strerror(errno));
>      }
> --
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list