From 492ddb5d1d595e2d12208f4602b18e4432f4e6b4 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 12 Dec 2011 16:52:33 +0000 Subject: 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 --- server/inputs_channel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/inputs_channel.c') 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 || -- cgit