[Spice-commits] server/common-graphics-channel.c server/sound.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Feb 15 10:10:24 UTC 2017
server/common-graphics-channel.c | 11 -----------
server/sound.c | 11 -----------
2 files changed, 22 deletions(-)
New commits:
commit 469b94eb4e54139fd11ea3705d8be82b58fb4c3f
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Sun Feb 12 21:03:23 2017 +0000
Do not set not blocking flag twice
Non blocking flag is set for all connection inside reds.c so
there's no need to set again for the single client channel.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/common-graphics-channel.c b/server/common-graphics-channel.c
index 29aa583..bad6e8c 100644
--- a/server/common-graphics-channel.c
+++ b/server/common-graphics-channel.c
@@ -117,20 +117,9 @@ int common_channel_config_socket(RedChannelClient *rcc)
RedClient *client = red_channel_client_get_client(rcc);
MainChannelClient *mcc = red_client_get_main(client);
RedsStream *stream = red_channel_client_get_stream(rcc);
- int flags;
int delay_val;
gboolean is_low_bandwidth;
- if ((flags = fcntl(stream->socket, F_GETFL)) == -1) {
- spice_warning("accept failed, %s", strerror(errno));
- return FALSE;
- }
-
- if (fcntl(stream->socket, F_SETFL, flags | O_NONBLOCK) == -1) {
- spice_warning("accept failed, %s", strerror(errno));
- return FALSE;
- }
-
// TODO - this should be dynamic, not one time at channel creation
is_low_bandwidth = main_channel_client_is_low_bandwidth(mcc);
delay_val = is_low_bandwidth ? 0 : 1;
diff --git a/server/sound.c b/server/sound.c
index 68aa191..e83a547 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -740,7 +740,6 @@ static void record_channel_send_item(RedChannelClient *rcc, G_GNUC_UNUSED RedPip
static int snd_channel_config_socket(RedChannelClient *rcc)
{
int delay_val;
- int flags;
#ifdef SO_PRIORITY
int priority;
#endif
@@ -749,11 +748,6 @@ static int snd_channel_config_socket(RedChannelClient *rcc)
RedClient *red_client = red_channel_client_get_client(rcc);
MainChannelClient *mcc = red_client_get_main(red_client);
- if ((flags = fcntl(stream->socket, F_GETFL)) == -1) {
- spice_printerr("accept failed, %s", strerror(errno));
- return FALSE;
- }
-
#ifdef SO_PRIORITY
priority = 6;
if (setsockopt(stream->socket, SOL_SOCKET, SO_PRIORITY, (void*)&priority,
@@ -778,11 +772,6 @@ static int snd_channel_config_socket(RedChannelClient *rcc)
}
}
- if (fcntl(stream->socket, F_SETFL, flags | O_NONBLOCK) == -1) {
- spice_printerr("accept failed, %s", strerror(errno));
- return FALSE;
- }
-
return TRUE;
}
More information about the Spice-commits
mailing list