diff options
author | Alon Levy <alevy@redhat.com> | 2010-11-10 09:28:39 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-03-02 17:27:52 +0200 |
commit | a05628bf061f5c0bcbd1221f8a990487210060de (patch) | |
tree | 3c13fe0ca151e5420f8260d390a2b1996aac4afb /server/inputs_channel.c | |
parent | 6b862596460802aff0604f16bb3e77c524512e84 (diff) | |
download | spice-a05628bf061f5c0bcbd1221f8a990487210060de.tar.gz spice-a05628bf061f5c0bcbd1221f8a990487210060de.tar.xz spice-a05628bf061f5c0bcbd1221f8a990487210060de.zip |
server/red_channel (all): add red_channel_get_stream
use in config_socket, this makes the stream internal to the RedChannel
implementation that will change later for multiple client support.
Diffstat (limited to 'server/inputs_channel.c')
-rw-r--r-- | server/inputs_channel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c index 8140c04e..5e2681ad 100644 --- a/server/inputs_channel.c +++ b/server/inputs_channel.c @@ -491,15 +491,16 @@ static int inputs_channel_config_socket(RedChannel *channel) { int flags; int delay_val = 1; + RedsStream *stream = red_channel_get_stream(channel); - if (setsockopt(channel->stream->socket, IPPROTO_TCP, TCP_NODELAY, + if (setsockopt(stream->socket, IPPROTO_TCP, TCP_NODELAY, &delay_val, sizeof(delay_val)) == -1) { red_printf("setsockopt failed, %s", strerror(errno)); return FALSE; } - if ((flags = fcntl(channel->stream->socket, F_GETFL)) == -1 || - fcntl(channel->stream->socket, F_SETFL, flags | O_ASYNC) == -1) { + if ((flags = fcntl(stream->socket, F_GETFL)) == -1 || + fcntl(stream->socket, F_SETFL, flags | O_ASYNC) == -1) { red_printf("fcntl failed, %s", strerror(errno)); return FALSE; } |