ui: refactor method for setting up VncDisplay auth types

There is a lot of repeated code in the auth type setup method,
particularly around checking TLS credential types. Refactor
it to reduce duplication and instead of having one method
do both plain and websockets at once, call it separately
for each.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1475163940-26094-6-git-send-email-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Daniel P. Berrange
2016-09-29 16:45:36 +01:00
committed by Gerd Hoffmann
parent bf01c1794e
commit eda24e1886
2 changed files with 57 additions and 76 deletions

View File

@ -172,6 +172,7 @@ struct VncDisplay
int auth;
int subauth; /* Used by VeNCrypt */
int ws_auth; /* Used by websockets */
int ws_subauth; /* Used by websockets */
bool lossy;
bool non_adaptive;
QCryptoTLSCreds *tlscreds;