[Spice-commits] server/red_worker.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Nov 24 06:04:20 PST 2015


 server/red_worker.c |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

New commits:
commit 58e14915d8600a2fe1e6a7770e50a388d195db2f
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Wed Sep 25 21:28:45 2013 +0200

    worker: rename red_connect_cursor and tidy up a bit
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/red_worker.c b/server/red_worker.c
index e0eebce..ba32ca8 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -4359,17 +4359,16 @@ static void handle_new_display_channel(RedWorker *worker, RedClient *client, Red
     dcc_start(dcc);
 }
 
-static void red_connect_cursor(RedWorker *worker, RedClient *client, RedsStream *stream,
-                               int migrate,
-                               uint32_t *common_caps, int num_common_caps,
-                               uint32_t *caps, int num_caps)
+static void cursor_connect(RedWorker *worker, RedClient *client, RedsStream *stream,
+                           int migrate,
+                           uint32_t *common_caps, int num_common_caps,
+                           uint32_t *caps, int num_caps)
 {
-    CursorChannel *channel;
+    CursorChannel *channel = worker->cursor_channel;
     CursorChannelClient *ccc;
 
-    spice_return_if_fail(worker->cursor_channel != NULL);
+    spice_return_if_fail(channel != NULL);
 
-    channel = worker->cursor_channel;
     spice_info("add cursor channel client");
     ccc = cursor_channel_client_new(channel, client, stream,
                                     migrate,
@@ -4897,14 +4896,12 @@ static void handle_dev_cursor_connect(void *opaque, void *payload)
 {
     RedWorkerMessageCursorConnect *msg = payload;
     RedWorker *worker = opaque;
-    RedsStream *stream = msg->stream;
-    RedClient *client = msg->client;
-    int migration = msg->migration;
 
     spice_info("cursor connect");
-    red_connect_cursor(worker, client, stream, migration,
-                       msg->common_caps, msg->num_common_caps,
-                       msg->caps, msg->num_caps);
+    cursor_connect(worker,
+                   msg->client, msg->stream, msg->migration,
+                   msg->common_caps, msg->num_common_caps,
+                   msg->caps, msg->num_caps);
     free(msg->caps);
     free(msg->common_caps);
 }


More information about the Spice-commits mailing list