summaryrefslogtreecommitdiff
path: root/server/red_worker.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-18 10:47:30 +0100
committerHans de Goede <hdegoede@redhat.com>2012-01-18 11:14:40 +0100
commitdc7855967f4e8aa4f1aee422cb8f09a414d8c69e (patch)
treed5cafe4270241cd0d53d091c60d765296e1c6b2b /server/red_worker.c
parentb5060ff81392ffdbbb6b516dc294f2bea75b4246 (diff)
server: Don't complain if setsockopt NODELAY fails on unix sockets
With Daniel P. Berrange's patches to allow use of pre-supplied fd's as channels, we can no longer be sure that our connections are TCP sockets, so it makes no sense to complain if a TCP/IP specific setsockopt fails with an errno of ENOTSUP. Note that this extends Daniel's commit 492ddb5d1d595e2d12208f4602b18e4432f4e6b4 which already added the same check to server/inputs_channel.c Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'server/red_worker.c')
-rw-r--r--server/red_worker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 983d767..c2ab957 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9498,7 +9498,9 @@ static int common_channel_config_socket(RedChannelClient *rcc)
// TODO - this should be dynamic, not one time at channel creation
delay_val = main_channel_client_is_low_bandwidth(mcc) ? 0 : 1;
if (setsockopt(stream->socket, IPPROTO_TCP, TCP_NODELAY, &delay_val, sizeof(delay_val)) == -1) {
- red_printf("setsockopt failed, %s", strerror(errno));
+ if (errno != ENOTSUP) {
+ red_printf("setsockopt failed, %s", strerror(errno));
+ }
}
return TRUE;
}