Re: [PATCH 4/4] channel: use iface parameter to distinguish interface context

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

 



On 01/06/2016 07:09 PM, Christophe Fergeau wrote:
On Mon, Dec 21, 2015 at 10:33:12AM +0000, Frediano Ziglio wrote:
---
  server/red-worker.c | 12 +++++-------
  1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/server/red-worker.c b/server/red-worker.c
index b0b7df1..0347404 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -71,6 +71,7 @@ struct RedWorker {
      QXLInstance *qxl;
      RedDispatcher *red_dispatcher;
      int running;
+    SpiceCoreInterfaceInternal core;
      struct pollfd poll_fds[MAX_EVENT_SOURCES];
      struct SpiceWatch watches[MAX_EVENT_SOURCES];
      unsigned int event_timeout;
@@ -534,16 +535,12 @@ static void worker_watch_update_mask(SpiceWatch *watch, int event_mask)
  static SpiceWatch *worker_watch_add(const SpiceCoreInterfaceInternal *iface,
                                      int fd, int event_mask, SpiceWatchFunc func, void *opaque)
  {
+    RedWorker *worker = SPICE_CONTAINEROF(iface, RedWorker, core);
      /* Since we are a channel core implementation, we always get called from
         red_channel_client_create(), so opaque always is our rcc */
      RedChannelClient *rcc = opaque;

I would remove this, or at least move this to the block where it's used
(some debug statement in an error case).

Maybe just replace the current initialization of worker.

_______________________________________________
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]