summaryrefslogtreecommitdiffstats
path: root/server/snd_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/snd_worker.c
parentb5060ff81392ffdbbb6b516dc294f2bea75b4246 (diff)
downloadspice-dc7855967f4e8aa4f1aee422cb8f09a414d8c69e.tar.gz
spice-dc7855967f4e8aa4f1aee422cb8f09a414d8c69e.tar.xz
spice-dc7855967f4e8aa4f1aee422cb8f09a414d8c69e.zip
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/snd_worker.c')
-rw-r--r--server/snd_worker.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/snd_worker.c b/server/snd_worker.c
index 0527009e..cb64c993 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -919,12 +919,16 @@ static SndChannel *__new_channel(SndWorker *worker, int size, uint32_t channel_i
tos = IPTOS_LOWDELAY;
if (setsockopt(stream->socket, IPPROTO_IP, IP_TOS, (void*)&tos, sizeof(tos)) == -1) {
- red_printf("setsockopt failed, %s", strerror(errno));
+ if (errno != ENOTSUP) {
+ red_printf("setsockopt failed, %s", strerror(errno));
+ }
}
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));
+ }
}
if (fcntl(stream->socket, F_SETFL, flags | O_NONBLOCK) == -1) {