[Spice-devel] [PATCH 13/24] server/red_channel: add red_channel_receive (for red_worker)

Alon Levy alevy at redhat.com
Wed Jan 19 10:07:59 PST 2011


---
 server/red_channel.c |    5 +++++
 server/red_channel.h |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/server/red_channel.c b/server/red_channel.c
index bda5e81..0492282 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -143,6 +143,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 10c9a66..e0eccd9 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -234,5 +234,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
-- 
1.7.3.4



More information about the Spice-devel mailing list