[Spice-devel,spice-server,v2] reds: use bool for RedsState::is_client_mouse_allowed

Submitted by Frediano Ziglio on June 16, 2017, 1:41 p.m.

Details

Message ID 20170616134103.23531-1-fziglio@redhat.com
State New
Headers show
Series "reds: Use bool for boolean types" ( rev: 6 5 4 3 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio June 16, 2017, 1:41 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/main-channel-client.c | 8 ++++----
 server/main-channel-client.h | 4 ++--
 server/main-channel.c        | 2 +-
 server/main-channel.h        | 2 +-
 server/reds-private.h        | 2 +-
 server/reds.c                | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index ae8d2d5..72cc697 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -88,7 +88,7 @@  typedef struct RedInitPipeItem {
     int connection_id;
     int display_channels_hint;
     int current_mouse_mode;
-    int is_client_mouse_allowed;
+    bool is_client_mouse_allowed;
     int multi_media_time;
     int ram_hint;
 } RedInitPipeItem;
@@ -111,7 +111,7 @@  typedef struct RedNotifyPipeItem {
 typedef struct RedMouseModePipeItem {
     RedPipeItem base;
     int current_mode;
-    int is_client_mouse_allowed;
+    bool is_client_mouse_allowed;
 } RedMouseModePipeItem;
 
 typedef struct RedMultiMediaTimePipeItem {
@@ -332,7 +332,7 @@  void main_channel_client_push_agent_data(MainChannelClient *mcc, uint8_t* data,
 static RedPipeItem *main_init_item_new(int connection_id,
                                        int display_channels_hint,
                                        int current_mouse_mode,
-                                       int is_client_mouse_allowed,
+                                       bool is_client_mouse_allowed,
                                        int multi_media_time,
                                        int ram_hint)
 {
@@ -351,7 +351,7 @@  static RedPipeItem *main_init_item_new(int connection_id,
 void main_channel_client_push_init(MainChannelClient *mcc,
                                    int display_channels_hint,
                                    int current_mouse_mode,
-                                   int is_client_mouse_allowed,
+                                   bool is_client_mouse_allowed,
                                    int multi_media_time,
                                    int ram_hint)
 {
diff --git a/server/main-channel-client.h b/server/main-channel-client.h
index cf54f51..7ff1f4c 100644
--- a/server/main-channel-client.h
+++ b/server/main-channel-client.h
@@ -70,7 +70,7 @@  void main_channel_client_start_net_test(MainChannelClient *mcc, int test_rate);
 void main_channel_client_push_init(MainChannelClient *mcc,
                                    int display_channels_hint,
                                    int current_mouse_mode,
-                                   int is_client_mouse_allowed,
+                                   bool is_client_mouse_allowed,
                                    int multi_media_time,
                                    int ram_hint);
 void main_channel_client_push_notify(MainChannelClient *mcc, const char *msg);
@@ -126,7 +126,7 @@  enum {
 
 typedef struct MainMouseModeItemInfo {
     int current_mode;
-    int is_client_mouse_allowed;
+    bool is_client_mouse_allowed;
 } MainMouseModeItemInfo;
 
 RedPipeItem *main_mouse_mode_item_new(RedChannelClient *rcc, void *data, int num);
diff --git a/server/main-channel.c b/server/main-channel.c
index e9fef7c..ebd7e75 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -86,7 +86,7 @@  static void main_channel_push_channels(MainChannelClient *mcc)
 }
 
 void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode,
-                                  int is_client_mouse_allowed)
+                                  bool is_client_mouse_allowed)
 {
     MainMouseModeItemInfo info = {
         .current_mode=current_mode,
diff --git a/server/main-channel.h b/server/main-channel.h
index 8f886dd..977cff1 100644
--- a/server/main-channel.h
+++ b/server/main-channel.h
@@ -61,7 +61,7 @@  RedClient *main_channel_get_client_by_link_id(MainChannel *main_chan, uint32_t l
 MainChannelClient *main_channel_link(MainChannel *, RedClient *client,
      RedsStream *stream, uint32_t link_id, int migration,
      RedChannelCapabilities *caps);
-void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode, int is_client_mouse_allowed);
+void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode, bool is_client_mouse_allowed);
 void main_channel_push_agent_connected(MainChannel *main_chan);
 void main_channel_push_agent_disconnected(MainChannel *main_chan);
 void main_channel_push_multi_media_time(MainChannel *main_chan, int time);
diff --git a/server/reds-private.h b/server/reds-private.h
index 5aebd5c..5cff9a4 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -102,7 +102,7 @@  struct RedsState {
 
     GList *channels;
     int mouse_mode;
-    int is_client_mouse_allowed;
+    bool is_client_mouse_allowed;
     bool dispatcher_allows_client_mouse;
     MonitorMode monitor_mode;
     SpiceTimer *mig_timer;
diff --git a/server/reds.c b/server/reds.c
index e1bac2d..f97c48c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -627,7 +627,7 @@  gboolean reds_config_get_agent_mouse(const RedsState *reds)
 
 static void reds_update_mouse_mode(RedsState *reds)
 {
-    int allowed = 0;
+    bool allowed = false;
     int qxl_count = g_list_length(reds->qxl_instances);
 
     if ((reds->config->agent_mouse && reds->vdagent) ||