ui: move some initialization out of vnc_init_state
commit90cd03a30ee96779ee9ae36a84b387452e256358
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 29 Sep 2016 15:45:39 +0000 (29 16:45 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Oct 2016 07:22:30 +0000 (13 09:22 +0200)
tree086ddbc6183c4e0ec975a1f72ca5bf764cf6f217
parent2df2041036ee63ff9116631c6214e3ffb5f4bf45
ui: move some initialization out of vnc_init_state

Most of the fields in VncState are initialized in the
vnc_connect() method, but some are done in vnc_init_state()
instead.

The purpose of having vnc_init_state() is to delay starting
of the VNC wire protocol until after the websockets handshake
has completed. As such the vnc_init_state() method only needs
to be used for initialization that is dependant on the wire
protocol running.

This also lets us get rid of the initialized boolean flag
from the VncState struct.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1475163940-26094-9-git-send-email-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c
ui/vnc.h