summaryrefslogtreecommitdiff
path: root/server/reds.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-02-10 16:37:49 -0600
committerFrediano Ziglio <fziglio@redhat.com>2016-02-16 10:54:10 +0000
commit2a18e874a2b2d5bfa95aaaee443ab7846fd8e7fb (patch)
tree30b48ca8a977691d1d06297e55258649ea7c9ab7 /server/reds.c
parentbc5c07a88109422c8c1e22a68b3d6f0606b74646 (diff)
Remove global main_dispatcher variable
Requires changing a bunch of internal API to take MainDispatcher arguments, etc. The main dispatcher object is now owned by RedsState, since that is the object that previously created (initialized) it. Acked-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index b13256ad..e12fdce1 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3350,7 +3350,7 @@ static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface)
reds_init_vd_agent_resources(reds);
ring_init(&reds->clients);
reds->num_clients = 0;
- main_dispatcher_init(reds->core);
+ reds->main_dispatcher = main_dispatcher_new(reds, reds->core);
ring_init(&reds->channels);
ring_init(&reds->mig_target_clients);
ring_init(&reds->char_devs_states);
@@ -4195,3 +4195,8 @@ uint32_t reds_qxl_ram_size(RedsState *reds)
first = reds->dispatchers->data;
return red_dispatcher_qxl_ram_size(first);
}
+
+MainDispatcher* reds_get_main_dispatcher(RedsState *reds)
+{
+ return reds->main_dispatcher;
+}