diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qemu-spice.h | 7 | ||||
-rw-r--r-- | ui/spice-core.c | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/ui/qemu-spice.h b/ui/qemu-spice.h index c35b29c1f6..680206a585 100644 --- a/ui/qemu-spice.h +++ b/ui/qemu-spice.h @@ -33,6 +33,7 @@ void qemu_spice_init(void); void qemu_spice_input_init(void); void qemu_spice_audio_init(void); void qemu_spice_display_init(DisplayState *ds); +int qemu_spice_display_add_client(int csock, int skipauth, int tls); int qemu_spice_add_interface(SpiceBaseInstance *sin); int qemu_spice_set_passwd(const char *passwd, bool fail_if_connected, bool disconnect_if_connected); @@ -68,6 +69,12 @@ static inline int qemu_spice_migrate_info(const char *h, int p, int t, return -1; } +static inline int qemu_spice_display_add_client(int csock, int skipauth, + int tls) +{ + return -1; +} + #endif /* CONFIG_SPICE */ #endif /* QEMU_SPICE_H */ diff --git a/ui/spice-core.c b/ui/spice-core.c index b4629f895b..05cb745be1 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -747,6 +747,19 @@ int qemu_spice_set_pw_expire(time_t expires) return qemu_spice_set_ticket(false, false); } +int qemu_spice_display_add_client(int csock, int skipauth, int tls) +{ +#if SPICE_SERVER_VERSION >= 0x000a01 + if (tls) { + return spice_server_add_ssl_client(spice_server, csock, skipauth); + } else { + return spice_server_add_client(spice_server, csock, skipauth); + } +#else + return -1; +#endif +} + static void spice_register_config(void) { qemu_add_opts(&qemu_spice_opts); |