diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2011-12-12 16:52:33 +0000 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-01-09 18:57:57 +0100 |
commit | 492ddb5d1d595e2d12208f4602b18e4432f4e6b4 (patch) | |
tree | eadf3487759c21d4140d65c9c4aefcfa8fba6b21 /server | |
parent | bd07dde530d9504e1cfe7ed5837fc00c26f36716 (diff) | |
download | spice-492ddb5d1d595e2d12208f4602b18e4432f4e6b4.tar.gz spice-492ddb5d1d595e2d12208f4602b18e4432f4e6b4.tar.xz spice-492ddb5d1d595e2d12208f4602b18e4432f4e6b4.zip |
Do not assume that SPICE is using a TCP socket
If setting the TCP_NODELAY socket option fails with ENOTSUP,
then don't treat this is a fatal error. SPICE is likely just
running over a UNIX socket instead.
* server/inputs_channel.c: Ignore TCP_NODELAY socket opt fails
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'server')
-rw-r--r-- | server/inputs_channel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c index c8b42e3e..0fa41629 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -466,8 +466,10 @@ static int inputs_channel_config_socket(RedChannelClient *rcc) if (setsockopt(stream->socket, IPPROTO_TCP, TCP_NODELAY, &delay_val, sizeof(delay_val)) == -1) { - red_printf("setsockopt failed, %s", strerror(errno)); - return FALSE; + if (errno != ENOTSUP) { + red_printf("setsockopt failed, %s", strerror(errno)); + return FALSE; + } } if ((flags = fcntl(stream->socket, F_GETFL)) == -1 || |