Re: [PATCH 01/13] worker: move red_init() functions

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

 



I think the answer (and I agree with Marc) is that a "red_init" function
should initialized the RedWorker structure so should call every function
which does part of this job.

Frediano

> 
> Question which pops to mind on this one is 'why?' (commit log should
> give some short rationale)
> 
> Christophe
> 
> On Fri, Jul 31, 2015 at 05:29:06PM +0100, Frediano Ziglio wrote:
> > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> > 
> > ---
> >  server/red_worker.c | 18 ++++++++++--------
> >  1 file changed, 10 insertions(+), 8 deletions(-)
> > 
> > diff --git a/server/red_worker.c b/server/red_worker.c
> > index 4584b36..48f7dc7 100644
> > --- a/server/red_worker.c
> > +++ b/server/red_worker.c
> > @@ -12157,6 +12157,15 @@ static void red_init(RedWorker *worker,
> > WorkerInitData *init_data)
> >  
> >      message = RED_WORKER_MESSAGE_READY;
> >      write_message(worker->channel, &message);
> > +
> > +    red_init_quic(worker);
> > +    red_init_lz(worker);
> > +    red_init_jpeg(worker);
> > +#ifdef USE_LZ4
> > +    red_init_lz4(worker);
> > +#endif
> > +    red_init_zlib(worker);
> > +    worker->event_timeout = INF_EVENT_WAIT;
> >  }
> >  
> >  static void red_display_cc_free_glz_drawables(RedChannelClient *rcc)
> > @@ -12181,14 +12190,7 @@ SPICE_GNUC_NORETURN void *red_worker_main(void
> > *arg)
> >  #endif
> >  
> >      red_init(worker, (WorkerInitData *)arg);
> > -    red_init_quic(worker);
> > -    red_init_lz(worker);
> > -    red_init_jpeg(worker);
> > -#ifdef USE_LZ4
> > -    red_init_lz4(worker);
> > -#endif
> > -    red_init_zlib(worker);
> > -    worker->event_timeout = INF_EVENT_WAIT;
> > +
> >      for (;;) {
> >          int i, num_events;
> >          unsigned int timers_queue_timeout;
> > --
> > 2.1.0
> > 
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
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]