[Spice-commits] server/inputs-channel-client.c server/inputs-channel.c server/inputs-channel.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri May 27 17:03:11 UTC 2016


 server/inputs-channel-client.c |    2 --
 server/inputs-channel.c        |    7 +------
 server/inputs-channel.h        |    1 -
 3 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 5d2fb6a89745767ad22ec60d4aa099e2301ca606
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri May 13 10:48:43 2016 +0100

    Avoid getting channel from client
    
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/inputs-channel-client.c b/server/inputs-channel-client.c
index f9dd6b2..2f8acec 100644
--- a/server/inputs-channel-client.c
+++ b/server/inputs-channel-client.c
@@ -54,9 +54,7 @@ void inputs_channel_client_send_migrate_data(RedChannelClient *rcc,
                                              RedPipeItem *item)
 {
     InputsChannelClient *icc = SPICE_CONTAINEROF(rcc, InputsChannelClient, base);
-    InputsChannel *inputs = (InputsChannel*)rcc->channel;
 
-    inputs_channel_set_src_during_migrate(inputs, FALSE);
     red_channel_client_init_send_data(rcc, SPICE_MSG_MIGRATE_DATA, item);
 
     spice_marshaller_add_uint32(m, SPICE_MIGRATE_DATA_INPUTS_MAGIC);
diff --git a/server/inputs-channel.c b/server/inputs-channel.c
index d2ce290..e91f7e1 100644
--- a/server/inputs-channel.c
+++ b/server/inputs-channel.c
@@ -261,6 +261,7 @@ static void inputs_channel_send_item(RedChannelClient *rcc, RedPipeItem *base)
             red_channel_client_init_send_data(rcc, SPICE_MSG_INPUTS_MOUSE_MOTION_ACK, base);
             break;
         case RED_PIPE_ITEM_MIGRATE_DATA:
+            ((InputsChannel*)rcc->channel)->src_during_migrate = FALSE;
             inputs_channel_client_send_migrate_data(rcc, m, base);
             break;
         default:
@@ -673,9 +674,3 @@ gboolean inputs_channel_is_src_during_migrate(InputsChannel *inputs)
 {
     return inputs->src_during_migrate;
 }
-
-void inputs_channel_set_src_during_migrate(InputsChannel *inputs,
-                                           gboolean value)
-{
-    inputs->src_during_migrate = value;
-}
diff --git a/server/inputs-channel.h b/server/inputs-channel.h
index 8a6211b..e8f92cc 100644
--- a/server/inputs-channel.h
+++ b/server/inputs-channel.h
@@ -41,6 +41,5 @@ void inputs_channel_detach_tablet(InputsChannel *inputs, SpiceTabletInstance *ta
 RedsState* spice_tablet_state_get_server(SpiceTabletState *dev);
 RedsState* spice_kbd_state_get_server(SpiceKbdState *dev);
 gboolean inputs_channel_is_src_during_migrate(InputsChannel *inputs);
-void inputs_channel_set_src_during_migrate(InputsChannel *inputs, gboolean value);
 
 #endif


More information about the Spice-commits mailing list