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

Daniel P. Berrange berrange at redhat.com
Thu Feb 9 06:04:16 PST 2012


On Tue, Feb 07, 2012 at 11:48:21AM -0500, Marc-André Lureau wrote:
> ack, (will push if you don't have commit access)

Yes please, I don't have access, though I have filed a freedesktop.org
BZ to get an account created.

Daniel

> 
> ----- 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
> > 

-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


More information about the Spice-devel mailing list