[PATCH 4/9] remove common_graphics_channel_new_client function

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

 



From: Frediano Ziglio <fziglio@xxxxxxxxxx>

The function was just calling another function with same parameters

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/cursor-channel.c | 16 ++++++++--------
 server/dcc.c            |  9 +++++----
 server/red-worker.c     | 20 --------------------
 server/red-worker.h     | 10 ----------
 4 files changed, 13 insertions(+), 42 deletions(-)

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 2621c5f..ce1ea97 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -387,14 +387,14 @@ static CursorChannelClient* cursor_channel_client_new(CursorChannel *cursor,
     spice_return_val_if_fail(!num_caps || caps, NULL);
 
     CursorChannelClient *ccc =
-        (CursorChannelClient*)common_graphics_channel_new_client(&cursor->common,
-                                                                 sizeof(CursorChannelClient),
-                                                                 client, stream,
-                                                                 FALSE,
-                                                                 common_caps,
-                                                                 num_common_caps,
-                                                                 caps,
-                                                                 num_caps);
+        (CursorChannelClient*)red_channel_client_create(sizeof(CursorChannelClient),
+                                                        &cursor->common.base,
+                                                        client, stream,
+                                                        FALSE,
+                                                        num_common_caps,
+                                                        common_caps,
+                                                        num_caps,
+                                                        caps);
     spice_return_val_if_fail(ccc != NULL, NULL);
     cursor->common.during_target_migrate = mig_target;
 
diff --git a/server/dcc.c b/server/dcc.c
index 81ae4ed..24d3d4b 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -364,11 +364,12 @@ DisplayChannelClient *dcc_new(DisplayChannel *display,
 {
     DisplayChannelClient *dcc;
 
-    dcc = (DisplayChannelClient*)common_graphics_channel_new_client(
-        COMMON_GRAPHICS_CHANNEL(display), sizeof(DisplayChannelClient),
+    dcc = (DisplayChannelClient*)red_channel_client_create(
+        sizeof(DisplayChannelClient),
+        &COMMON_GRAPHICS_CHANNEL(display)->base,
         client, stream, TRUE,
-        common_caps, num_common_caps,
-        caps, num_caps);
+        num_common_caps, common_caps,
+        num_caps, caps);
     display->common.during_target_migrate = mig_target;
     dcc->id = display->common.qxl->id;
     spice_return_val_if_fail(dcc, NULL);
diff --git a/server/red-worker.c b/server/red-worker.c
index 8f9c8dd..9744131 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -441,26 +441,6 @@ static int common_channel_config_socket(RedChannelClient *rcc)
     return TRUE;
 }
 
-CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsChannel *common,
-                                                                int size,
-                                                                RedClient *client,
-                                                                RedsStream *stream,
-                                                                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,
-                                  num_common_caps, common_caps, num_caps, caps);
-    if (!rcc) {
-        return NULL;
-    }
-    return (CommonGraphicsChannelClient*)rcc;
-}
-
-
 CommonGraphicsChannel *red_worker_new_channel(RedWorker *worker, int size,
                                               const char *name,
                                               uint32_t channel_type, int migration_flags,
diff --git a/server/red-worker.h b/server/red-worker.h
index 318a004..31a6f3e 100644
--- a/server/red-worker.h
+++ b/server/red-worker.h
@@ -100,14 +100,4 @@ CommonGraphicsChannel *red_worker_new_channel(RedWorker *worker, int size,
                                               ChannelCbs *channel_cbs,
                                               channel_handle_parsed_proc handle_parsed);
 
-CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsChannel *common,
-                                                                int size,
-                                                                RedClient *client,
-                                                                RedsStream *stream,
-                                                                int monitor_latency,
-                                                                uint32_t *common_caps,
-                                                                int num_common_caps,
-                                                                uint32_t *caps,
-                                                                int num_caps);
-
 #endif
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]