[Spice-commits] server/dcc.c server/main-channel-client.c server/main-channel.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Mar 3 15:33:10 UTC 2017


 server/dcc.c                 |    4 ++--
 server/main-channel-client.c |    4 ++--
 server/main-channel.c        |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit cf3a9183a44c5b3f05b8f317b78a788548f19ed1
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Mar 3 15:05:12 2017 +0000

    Use variable values instead of computing again
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/dcc.c b/server/dcc.c
index 898e074..f42cac0 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -563,7 +563,7 @@ void dcc_start(DisplayChannelClient *dcc)
     DisplayChannel *display = DCC_TO_DC(dcc);
     RedChannelClient *rcc = RED_CHANNEL_CLIENT(dcc);
 
-    red_channel_client_push_set_ack(RED_CHANNEL_CLIENT(dcc));
+    red_channel_client_push_set_ack(rcc);
 
     if (red_channel_client_is_waiting_for_migrate_data(rcc))
         return;
@@ -571,7 +571,7 @@ void dcc_start(DisplayChannelClient *dcc)
     if (!display_channel_client_wait_for_init(dcc))
         return;
 
-    red_channel_client_ack_zero_messages_window(RED_CHANNEL_CLIENT(dcc));
+    red_channel_client_ack_zero_messages_window(rcc);
     if (display->priv->surfaces[0].context.canvas) {
         display_channel_current_flush(display, 0);
         red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE);
diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index 2b68407..f6f7e87 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -510,7 +510,7 @@ void main_channel_client_handle_pong(MainChannelClient *mcc, SpiceMsgPing *ping,
                            "bandwidth", mcc->priv->latency, roundtrip);
             mcc->priv->latency = 0;
             mcc->priv->net_test_stage = NET_TEST_STAGE_INVALID;
-            red_channel_client_start_connectivity_monitoring(RED_CHANNEL_CLIENT(mcc),
+            red_channel_client_start_connectivity_monitoring(rcc,
                                                              CLIENT_CONNECTIVITY_TIMEOUT);
             break;
         }
@@ -522,7 +522,7 @@ void main_channel_client_handle_pong(MainChannelClient *mcc, SpiceMsgPing *ping,
                        mcc->priv->bitrate_per_sec,
                        (double)mcc->priv->bitrate_per_sec / 1024 / 1024,
                        main_channel_client_is_low_bandwidth(mcc) ? " LOW BANDWIDTH" : "");
-        red_channel_client_start_connectivity_monitoring(RED_CHANNEL_CLIENT(mcc),
+        red_channel_client_start_connectivity_monitoring(rcc,
                                                          CLIENT_CONNECTIVITY_TIMEOUT);
         break;
     default:
diff --git a/server/main-channel.c b/server/main-channel.c
index 307c80f..dd89489 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -87,7 +87,7 @@ static void main_channel_push_channels(MainChannelClient *mcc)
                    "during migration");
         return;
     }
-    red_channel_client_pipe_add_type(RED_CHANNEL_CLIENT(mcc), RED_PIPE_ITEM_TYPE_MAIN_CHANNELS_LIST);
+    red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_MAIN_CHANNELS_LIST);
 }
 
 void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode,


More information about the Spice-commits mailing list