summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-07 13:07:35 +0200
committerAlon Levy <alevy@redhat.com>2010-11-07 13:07:35 +0200
commit0a77e92949d0d69bd05b94019b5de93742f40b29 (patch)
treee31882f86bb5f6db013a2944d435c119ddc35bb1
parentb9af099651f5f06c69457f3f4cc8ec4b4140a15e (diff)
downloadspice-0a77e92949d0d69bd05b94019b5de93742f40b29.tar.gz
spice-0a77e92949d0d69bd05b94019b5de93742f40b29.tar.xz
spice-0a77e92949d0d69bd05b94019b5de93742f40b29.zip
server/red_channel: add red_channel_receive (for red_worker)
-rw-r--r--server/red_channel.c5
-rw-r--r--server/red_channel.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index d955139c..ff376225 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -138,6 +138,11 @@ static void red_peer_handle_incoming(RedsStreamContext *peer, IncomingHandler *h
}
}
+void red_channel_receive(RedChannel *channel)
+{
+ red_peer_handle_incoming(channel->peer, &channel->incoming);
+}
+
static void red_peer_handle_outgoing(RedsStreamContext *peer, OutgoingHandler *handler)
{
int n;
diff --git a/server/red_channel.h b/server/red_channel.h
index dd85c8f2..5f3e5bc4 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -237,5 +237,13 @@ void red_channel_push(RedChannel *channel);
// current red_channel_shutdown also closes the socket - is there a socket to close?
// are we reading from an fd here? arghh
void red_channel_pipe_clear(RedChannel *channel);
+// Again, used in various places outside of event handler context (or in other event handler
+// contexts):
+// flush_display_commands/flush_cursor_commands
+// display_channel_wait_for_init
+// red_wait_outgoing_item
+// red_wait_pipe_item_sent
+// handle_channel_events - this is the only one that was used before, and was in red_channel.c
+void red_channel_receive(RedChannel *channel);
#endif