Re: [PATCH 11/16] worker: merge handle_new_display_channel

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

 



> 
> Fine. It's just code movement, and the old function name was a bit misleading
> anyway (we're handling a new display client, not a new display channel)
> 
> Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> 
> 
> On Thu, 2015-11-26 at 16:06 +0000, Frediano Ziglio wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> > 
> > ---
> >  server/red_worker.c | 49 ++++++++++++++++---------------------------------
> >  1 file changed, 16 insertions(+), 33 deletions(-)
> > 
> > diff --git a/server/red_worker.c b/server/red_worker.c
> > index 2a58052..cf20ccd 100644
> > --- a/server/red_worker.c
> > +++ b/server/red_worker.c
> > @@ -722,31 +722,6 @@ static void guest_set_client_capabilities(RedWorker
> > *worker)
> >      }
> >  }
> >  
> > -static void handle_new_display_channel(RedWorker *worker, RedClient
> > *client,
> > RedsStream *stream,
> > -                                       int migrate,
> > -                                       uint32_t *common_caps, int
> > num_common_caps,
> > -                                       uint32_t *caps, int num_caps)
> > -{
> > -    DisplayChannel *display;
> > -    DisplayChannelClient *dcc;
> > -
> > -    spice_return_if_fail(worker->display_channel);-
> > -    display = worker->display_channel;
> > -    spice_info("add display channel client");
> > -    dcc = dcc_new(display, client, stream, migrate,
> > -                  common_caps, num_common_caps, caps, num_caps,
> > -                  worker->image_compression, worker->jpeg_state, worker
> > ->zlib_glz_state);
> > -    if (!dcc) {
> > -        return;
> > -    }
> > -
> > -    display_channel_update_compression(display, dcc);
> > -
> > -    guest_set_client_capabilities(worker);
> > -    dcc_start(dcc);
> > -}
> > -
> >  static void cursor_connect(RedWorker *worker, RedClient *client,
> >  RedsStream
> > *stream,
> >                             int migrate,
> >                             uint32_t *common_caps, int num_common_caps,
> > @@ -1107,14 +1082,22 @@ static void handle_dev_display_connect(void
> > *opaque,
> > void *payload)
> >  {
> >      RedWorkerMessageDisplayConnect *msg = payload;
> >      RedWorker *worker = opaque;
> > -    RedsStream *stream = msg->stream;
> > -    RedClient *client = msg->client;
> > -    int migration = msg->migration;
> > -
> > -    spice_info("connect");
> > -    handle_new_display_channel(worker, client, stream, migration,
> > -                               msg->common_caps, msg->num_common_caps,
> > -                               msg->caps, msg->num_caps);
> > +    DisplayChannel *display = worker->display_channel;
> > +    DisplayChannelClient *dcc;
> > +
> > +    spice_info("connect new client");
> > +    spice_return_if_fail(display);
> > +
> > +    dcc = dcc_new(display, msg->client, msg->stream, msg->migration,
> > +                  msg->common_caps, msg->num_common_caps, msg->caps, msg
> > ->num_caps,
> > +                  worker->image_compression, worker->jpeg_state, worker
> > ->zlib_glz_state);
> > +    if (!dcc) {
> > +        return;
> > +    }
> > +    display_channel_update_compression(display, dcc);
> > +    guest_set_client_capabilities(worker);
> > +    dcc_start(dcc);
> > +
> >      free(msg->caps);
> >      free(msg->common_caps);
> >  }
> 

Merged

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