[Spice-commits] 2 commits - server/dcc.c server/red-channel-client.c server/red-channel-client.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Aug 25 13:42:49 UTC 2017


 server/dcc.c                |    2 +-
 server/red-channel-client.c |   14 +++++++-------
 server/red-channel-client.h |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit d27c18e981871e70d26b07535f8c76880d7250ec
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Aug 25 13:31:01 2017 +0100

    dcc: Reuse display variable
    
    display variable already contains the DCC_TO_DC(dcc) value so
    reuse it.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/dcc.c b/server/dcc.c
index 4490507b..2778bb88 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -297,7 +297,7 @@ void dcc_create_surface(DisplayChannelClient *dcc, int surface_id)
     }
 
     display = DCC_TO_DC(dcc);
-    flags = is_primary_surface(DCC_TO_DC(dcc), surface_id) ? SPICE_SURFACE_FLAGS_PRIMARY : 0;
+    flags = is_primary_surface(display, surface_id) ? SPICE_SURFACE_FLAGS_PRIMARY : 0;
 
     /* don't send redundant create surface commands to client */
     if (!dcc ||
commit 9a54ddf459cff07deacb6b501c0b0f37d1881b29
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Thu Mar 9 18:43:01 2017 +0100

    RedChannelClient: Mark some private data as bool
    
    Some RedChannelClient data members were marked as int when they only
    hold booleans.
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index f1042dd4..145ba43f 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -147,15 +147,15 @@ struct RedChannelClientPrivate
         } urgent;
     } send_data;
 
-    int during_send;
+    bool during_send;
     GQueue pipe;
 
     RedChannelCapabilities remote_caps;
-    int is_mini_header;
-    gboolean destroying;
+    bool is_mini_header;
+    bool destroying;
 
-    int wait_migrate_data;
-    int wait_migrate_flush_mark;
+    bool wait_migrate_data;
+    bool wait_migrate_flush_mark;
 
     RedChannelClientLatencyMonitor latency_monitor;
     RedChannelClientConnectivityMonitor connectivity_monitor;
@@ -1619,7 +1619,7 @@ GQueue* red_channel_client_get_pipe(RedChannelClient *rcc)
     return &rcc->priv->pipe;
 }
 
-gboolean red_channel_client_is_mini_header(RedChannelClient *rcc)
+bool red_channel_client_is_mini_header(RedChannelClient *rcc)
 {
     return rcc->priv->is_mini_header;
 }
@@ -1872,7 +1872,7 @@ void red_channel_client_set_destroying(RedChannelClient *rcc)
     rcc->priv->destroying = TRUE;
 }
 
-gboolean red_channel_client_is_destroying(RedChannelClient *rcc)
+bool red_channel_client_is_destroying(RedChannelClient *rcc)
 {
     return rcc->priv->destroying;
 }
diff --git a/server/red-channel-client.h b/server/red-channel-client.h
index 52527399..057732f4 100644
--- a/server/red-channel-client.h
+++ b/server/red-channel-client.h
@@ -103,7 +103,7 @@ void red_channel_client_pipe_add_empty_msg(RedChannelClient *rcc, int msg_type);
 gboolean red_channel_client_pipe_is_empty(RedChannelClient *rcc);
 uint32_t red_channel_client_get_pipe_size(RedChannelClient *rcc);
 GQueue* red_channel_client_get_pipe(RedChannelClient *rcc);
-gboolean red_channel_client_is_mini_header(RedChannelClient *rcc);
+bool red_channel_client_is_mini_header(RedChannelClient *rcc);
 
 void red_channel_client_ack_zero_messages_window(RedChannelClient *rcc);
 void red_channel_client_ack_set_client_window(RedChannelClient *rcc, int client_window);
@@ -151,7 +151,7 @@ void red_channel_client_init_outgoing_messages_window(RedChannelClient *rcc);
 
 gboolean red_channel_client_set_migration_seamless(RedChannelClient *rcc);
 void red_channel_client_set_destroying(RedChannelClient *rcc);
-gboolean red_channel_client_is_destroying(RedChannelClient *rcc);
+bool red_channel_client_is_destroying(RedChannelClient *rcc);
 
 struct RedChannelClient
 {


More information about the Spice-commits mailing list