summaryrefslogtreecommitdiffstats
path: root/server/red_channel.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-11 11:05:01 +0200
committerAlon Levy <alevy@redhat.com>2011-03-02 17:27:52 +0200
commit17d57613225fe3520b42aaddbab4b5252b9c8b3b (patch)
tree5cefacb39e7a9b84fba2633a0b5c0d035902c881 /server/red_channel.c
parent8cd5568c92384490ec20f898d2d8c12009b6bf47 (diff)
downloadspice-17d57613225fe3520b42aaddbab4b5252b9c8b3b.tar.gz
spice-17d57613225fe3520b42aaddbab4b5252b9c8b3b.tar.xz
spice-17d57613225fe3520b42aaddbab4b5252b9c8b3b.zip
server/red_channel: add red_channel_get_first_socket
Use in main_channel. This is just for backward portability later when multiple clients are introduced - needs to be considered (which sockets do we want to export from libspiceserver?)
Diffstat (limited to 'server/red_channel.c')
-rw-r--r--server/red_channel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index 1b705d67..a1bce119 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -711,3 +711,11 @@ RedsStream *red_channel_get_stream(RedChannel *channel)
{
return channel->stream;
}
+
+int red_channel_get_first_socket(RedChannel *channel)
+{
+ if (!channel->stream) {
+ return -1;
+ }
+ return channel->stream->socket;
+}