try to push either on signal (write available) or when blocked
and read signaled. From red_worker, copied for compatibility when
switching later to RedChannel in red_worker. Doesn't make a lot of
sense (but works), see comment in patch.
---
 server/red_channel.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/server/red_channel.c b/server/red_channel.c
index be44995..45e4b0a 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -424,7 +424,12 @@ static void red_channel_event(int fd, int event, void 
*data)
     if (event & SPICE_WATCH_EVENT_READ) {
         red_channel_receive(channel);
     }
-    if (event & SPICE_WATCH_EVENT_WRITE) {
+    // TODO: || channel->send_data.blocked ? (from red_worker. doesn't really 
make sense if we have an event
+    // fired in that case)
+    if (event & SPICE_WATCH_EVENT_WRITE || channel->send_data.blocked) {
+        if (channel->send_data.blocked && ! (event & SPICE_WATCH_EVENT_WRITE)) 
{
+            red_printf("pushing because of blocked");
+        }
         red_channel_push(channel);
     }
 }
-- 
1.7.3.4

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to