[Spice-devel] [PATCH 16/23] server/red_channel: red_channel_event: push on blocked
Alon Levy
alevy at redhat.com
Mon Feb 7 09:31:18 PST 2011
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 faec613..6165d0e 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.4
More information about the Spice-devel
mailing list