[PATCH 3.6/12] common_channel_client_create -> common_channel_new_client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>

Rename and re-order the initial arguments to make this function look and
act more like a method of the CommonChannel class.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 server/cursor-channel.c | 18 +++++++++---------
 server/red_worker.c     | 24 ++++++++++++------------
 server/red_worker.h     | 22 +++++++++++-----------
 3 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index ad0998e..24b7362 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -393,15 +393,15 @@ CursorChannelClient *cursor_channel_client_new(CommonChannel *common,
                                                uint32_t *caps, int num_caps)
 {
     CursorChannelClient *ccc =
-        (CursorChannelClient*)common_channel_client_create(
-            sizeof(CursorChannelClient), common, client, stream,
-            mig_target,
-            FALSE,
-            common_caps,
-            num_common_caps,
-            caps,
-            num_caps);
-
+        (CursorChannelClient*)common_channel_new_client(common,
+                                                        sizeof(CursorChannelClient),
+                                                        client, stream,
+                                                        mig_target,
+                                                        FALSE,
+                                                        common_caps,
+                                                        num_common_caps,
+                                                        caps,
+                                                        num_caps);
     if (!ccc) {
         return NULL;
     }
diff --git a/server/red_worker.c b/server/red_worker.c
index 0631efb..0c8ba4c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9506,16 +9506,16 @@ SpiceCoreInterface worker_core = {
     .watch_remove = worker_watch_remove,
 };
 
-CommonChannelClient *common_channel_client_create(int size,
-                                                  CommonChannel *common,
-                                                  RedClient *client,
-                                                  RedsStream *stream,
-                                                  int mig_target,
-                                                  int monitor_latency,
-                                                  uint32_t *common_caps,
-                                                  int num_common_caps,
-                                                  uint32_t *caps,
-                                                  int num_caps)
+CommonChannelClient *common_channel_new_client(CommonChannel *common,
+                                               int size,
+                                               RedClient *client,
+                                               RedsStream *stream,
+                                               int mig_target,
+                                               int monitor_latency,
+                                               uint32_t *common_caps,
+                                               int num_common_caps,
+                                               uint32_t *caps,
+                                               int num_caps)
 {
     RedChannelClient *rcc =
         red_channel_client_create(size, &common->base, client, stream, monitor_latency,
@@ -9543,8 +9543,8 @@ DisplayChannelClient *display_channel_client_create(CommonChannel *common,
                                                     uint32_t *caps, int num_caps)
 {
     DisplayChannelClient *dcc =
-        (DisplayChannelClient*)common_channel_client_create(
-            sizeof(DisplayChannelClient), common, client, stream,
+        (DisplayChannelClient*)common_channel_new_client(
+            common, sizeof(DisplayChannelClient), client, stream,
             mig_target,
             TRUE,
             common_caps, num_common_caps,
diff --git a/server/red_worker.h b/server/red_worker.h
index c828d99..795959d 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -118,17 +118,6 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher);
 bool       red_worker_run(RedWorker *worker);
 QXLInstance* red_worker_get_qxl(RedWorker *worker);
 
-CommonChannelClient *common_channel_client_create(int size,
-                                                  CommonChannel *common,
-                                                  RedClient *client,
-                                                  RedsStream *stream,
-                                                  int mig_target,
-                                                  int monitor_latency,
-                                                  uint32_t *common_caps,
-                                                  int num_common_caps,
-                                                  uint32_t *caps,
-                                                  int num_caps);
-
 RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_type,
                           int migration_flags,
                           channel_disconnect_proc on_disconnect,
@@ -140,4 +129,15 @@ RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_type,
                           channel_handle_migrate_data_proc handle_migrate_data,
                           channel_handle_migrate_data_get_serial_proc migrate_get_serial);
 
+CommonChannelClient *common_channel_new_client(CommonChannel *common,
+                                               int size,
+                                               RedClient *client,
+                                               RedsStream *stream,
+                                               int mig_target,
+                                               int monitor_latency,
+                                               uint32_t *common_caps,
+                                               int num_common_caps,
+                                               uint32_t *caps,
+                                               int num_caps);
+
 #endif
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]