diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2015-07-31 17:29:06 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-08-11 17:21:59 +0200 |
commit | e3187ebd29ee689fa8679dc56433e0a391c395f2 (patch) | |
tree | 1dcd66dd1b18eb562008232e9139b2912c834c06 | |
parent | 7c7567292f11a9c617b5397cf0e25033568b6092 (diff) |
worker: move red_init_*() functions
There is a red_init() methods, we can group all the red_init_*() calls
in it rather than calling red_init() followed by all these calls in our
main function.
-rw-r--r-- | server/red_worker.c | 18 |
1 files 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; |