[Spice-devel] [PATCH spice-server v2 6/8] fixup! Add CommonGraphicsChannelPrivate struct

Frediano Ziglio fziglio at redhat.com
Mon Oct 10 16:11:12 UTC 2016


Avoid lines with more than 100 characters

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/dcc.c        | 3 ++-
 server/red-worker.c | 9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/dcc.c b/server/dcc.c
index 021c241..3519d2e 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -284,7 +284,8 @@ void dcc_create_surface(DisplayChannelClient *dcc, int surface_id)
     flags = is_primary_surface(DCC_TO_DC(dcc), surface_id) ? SPICE_SURFACE_FLAGS_PRIMARY : 0;
 
     /* don't send redundant create surface commands to client */
-    if (!dcc || common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) ||
+    if (!dcc ||
+        common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(display)) ||
         dcc->priv->surface_client_created[surface_id]) {
         return;
     }
diff --git a/server/red-worker.c b/server/red-worker.c
index 8da154a..678856b 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -533,8 +533,9 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
                                    line_0, surface.flags & QXL_SURF_FLAG_KEEP_DATA, TRUE);
     display_channel_set_monitors_config_to_primary(display);
 
+    CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(worker->display_channel);
     if (display_is_connected(worker) &&
-        !common_graphics_channel_get_during_target_migrate(COMMON_GRAPHICS_CHANNEL(worker->display_channel))) {
+        !common_graphics_channel_get_during_target_migrate(common)) {
         /* guest created primary, so it will (hopefully) send a monitors_config
          * now, don't send our own temporary one */
         if (!worker->driver_cap_monitors_config) {
@@ -639,10 +640,12 @@ static void handle_dev_start(void *opaque, void *payload)
 
     spice_assert(!worker->running);
     if (worker->cursor_channel) {
-        common_graphics_channel_set_during_target_migrate(COMMON_GRAPHICS_CHANNEL(worker->cursor_channel), FALSE);
+        CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(worker->cursor_channel);
+        common_graphics_channel_set_during_target_migrate(common, FALSE);
     }
     if (worker->display_channel) {
-        common_graphics_channel_set_during_target_migrate(COMMON_GRAPHICS_CHANNEL(worker->display_channel), FALSE);
+        CommonGraphicsChannel *common = COMMON_GRAPHICS_CHANNEL(worker->display_channel);
+        common_graphics_channel_set_during_target_migrate(common, FALSE);
         display_channel_wait_for_migrate_data(worker->display_channel);
     }
     worker->running = TRUE;
-- 
2.7.4



More information about the Spice-devel mailing list