[Spice-devel,v6,5/9] server/red_worker: handle_dev_input: reuse write_ready introduced for async

Submitted by Alon Levy on July 20, 2011, 3:19 p.m.

Details

Message ID 1311149999-13216-6-git-send-email-alevy@redhat.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy July 20, 2011, 3:19 p.m.
---
 server/red_worker.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

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: