[Spice-devel] [PATCH v6 5/9] server/red_worker: handle_dev_input: reuse write_ready introduced for async
Alon Levy
alevy at redhat.com
Wed Jul 20 01:19:55 PDT 2011
---
server/red_worker.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index f29a420..ec895ec 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9708,6 +9708,10 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
case RED_WORKER_MESSAGE_CREATE_PRIMARY_SURFACE:
case RED_WORKER_MESSAGE_DESTROY_PRIMARY_SURFACE:
case RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT:
+ case RED_WORKER_MESSAGE_RESET_CURSOR:
+ case RED_WORKER_MESSAGE_RESET_IMAGE_CACHE:
+ case RED_WORKER_MESSAGE_STOP:
+ case RED_WORKER_MESSAGE_LOADVM_COMMANDS:
write_ready = 1;
default:
break;
@@ -9740,13 +9744,9 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
break;
case RED_WORKER_MESSAGE_RESET_CURSOR:
red_cursor_reset(worker);
- message = RED_WORKER_MESSAGE_READY;
- write_message(worker->channel, &message);
break;
case RED_WORKER_MESSAGE_RESET_IMAGE_CACHE:
image_cache_reset(&worker->image_cache);
- message = RED_WORKER_MESSAGE_READY;
- write_message(worker->channel, &message);
break;
case RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT_ASYNC:
case RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT:
@@ -9781,8 +9781,6 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
case RED_WORKER_MESSAGE_STOP: {
red_printf("stop");
handle_dev_stop(worker);
- message = RED_WORKER_MESSAGE_READY;
- write_message(worker->channel, &message);
break;
}
case RED_WORKER_MESSAGE_START:
@@ -9908,8 +9906,6 @@ static void handle_dev_input(EventListener *listener, uint32_t events)
}
count--;
}
- message = RED_WORKER_MESSAGE_READY;
- write_message(worker->channel, &message);
break;
}
default:
--
1.7.6
More information about the Spice-devel
mailing list