diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-01-23 16:21:14 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-01-23 16:21:14 +0100 |
commit | 2f4115e52eeea3039a9e230d8c79ab42691a7dbf (patch) | |
tree | 3b5337f7baa7fcbf54c044171ecf705c7c077efd /server/snd_worker.c | |
parent | c05523462f2c63bfedf183d9fee6debbce6b6ac0 (diff) | |
parent | 8817549795722026ca83edab2640b8f156510074 (diff) |
Merge remote-tracking branch 'origin/master' into 0.100.10.1
Diffstat (limited to 'server/snd_worker.c')
-rw-r--r-- | server/snd_worker.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/server/snd_worker.c b/server/snd_worker.c index 0527009e..e78d1d33 100644 --- a/server/snd_worker.c +++ b/server/snd_worker.c @@ -902,7 +902,9 @@ static SndChannel *__new_channel(SndWorker *worker, int size, uint32_t channel_i SndChannel *channel; int delay_val; int flags; +#ifdef SO_PRIORITY int priority; +#endif int tos; MainChannelClient *mcc = red_client_get_main(client); @@ -911,20 +913,28 @@ static SndChannel *__new_channel(SndWorker *worker, int size, uint32_t channel_i goto error1; } +#ifdef SO_PRIORITY priority = 6; if (setsockopt(stream->socket, SOL_SOCKET, SO_PRIORITY, (void*)&priority, sizeof(priority)) == -1) { - red_printf("setsockopt failed, %s", strerror(errno)); + if (errno != ENOTSUP) { + red_printf("setsockopt failed, %s", strerror(errno)); + } } +#endif 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) { |