spice: fix coverity defect, add unix address support
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJUwNxEAAoJEEy22O7T6HE4srMQAIBKASUv8434NMAtnRKmMtUk auQrl+ZZjjluymrULtGjXaCHpw0o8taMjRhFi21ODuQFEbHm8oo2NThSY2gxmg91 sQIR5WNb9O4a6S3jAH/XVf/iTBDaPIcFVSeuML7+YhXp3rhIfBMIj6trsK/iWSGD qCDWKMORZAdGrGPh6wzskmfR2fRm/sXeXm7oqmEP0jawd0oIX+Chno5BbfXz4/WB 18SV/b2nqiV4vGOZF7Lzyi0a5IcrJV9vl+kQRf446TbJbyoVZPZQp6qLOCL3UT4c P5MtON2XqFjJb2BvXN6Jg3sMSGYGixHtenHXLXCTRUCUD+CWMIwN+AeA9q17wiWJ bXjYROx6oQ1YmhXLaJI0N7dXTohBEYC54SoDjinjdIKKrf2rCjAr6B6eaqyidc4q GHCrOdL4jTkbcAiBJ/MgUBgay9OFbKkje7tK8BP1j7cWpDaz7lG8qErmwkzWW3DX PvZxumMYnQe5gVPI6nIT2dNTwRTofyavkb/1KnthJTeFqJa1ecFCjew8c9TLo0WO 29WHTeuwtblUmRFarapaB2zRyt6LR+f75mRQHog3h1qFaBiaWYuMrtxoqrCq1RL2 J0LRLnmVxKK2+nuAHM4xMvzLl7dLHKIHHMClhAj3E8rIHOnk8ssy9/lunDiq/VHt CENvqA32bzkZyW2fmT3H =BEw6 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150122-1' into staging spice: fix coverity defect, add unix address support # gpg: Signature made Thu 22 Jan 2015 11:17:24 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20150122-1: spice: fix coverity reported defect in display code spice: add unix address support Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
adeecf14d6
@ -953,7 +953,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice,
|
||||
"-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
|
||||
" [,x509-key-file=<file>][,x509-key-password=<file>]\n"
|
||||
" [,x509-cert-file=<file>][,x509-cacert-file=<file>]\n"
|
||||
" [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6]\n"
|
||||
" [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6|unix]\n"
|
||||
" [,tls-ciphers=<list>]\n"
|
||||
" [,tls-channel=[main|display|cursor|inputs|record|playback]]\n"
|
||||
" [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n"
|
||||
@ -982,6 +982,7 @@ Set the IP address spice is listening on. Default is any address.
|
||||
|
||||
@item ipv4
|
||||
@item ipv6
|
||||
@item unix
|
||||
Force using the specified IP version.
|
||||
|
||||
@item password=<secret>
|
||||
|
@ -436,6 +436,11 @@ static QemuOptsList qemu_spice_opts = {
|
||||
},{
|
||||
.name = "ipv6",
|
||||
.type = QEMU_OPT_BOOL,
|
||||
#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
|
||||
},{
|
||||
.name = "unix",
|
||||
.type = QEMU_OPT_BOOL,
|
||||
#endif
|
||||
},{
|
||||
.name = "password",
|
||||
.type = QEMU_OPT_STRING,
|
||||
@ -708,6 +713,10 @@ void qemu_spice_init(void)
|
||||
addr_flags |= SPICE_ADDR_FLAG_IPV4_ONLY;
|
||||
} else if (qemu_opt_get_bool(opts, "ipv6", 0)) {
|
||||
addr_flags |= SPICE_ADDR_FLAG_IPV6_ONLY;
|
||||
#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
|
||||
} else if (qemu_opt_get_bool(opts, "unix", 0)) {
|
||||
addr_flags |= SPICE_ADDR_FLAG_UNIX_ONLY;
|
||||
#endif
|
||||
}
|
||||
|
||||
spice_server = spice_server_new();
|
||||
|
@ -438,9 +438,6 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
|
||||
qemu_mutex_lock(&ssd->lock);
|
||||
need_destroy = (ssd->ds != NULL);
|
||||
ssd->ds = surface;
|
||||
ssd->surface = pixman_image_ref(ssd->ds->image);
|
||||
ssd->mirror = qemu_pixman_mirror_create(ssd->ds->format,
|
||||
ssd->ds->image);
|
||||
while ((update = QTAILQ_FIRST(&ssd->updates)) != NULL) {
|
||||
QTAILQ_REMOVE(&ssd->updates, update, next);
|
||||
qemu_spice_destroy_update(ssd, update);
|
||||
@ -450,6 +447,9 @@ void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
|
||||
qemu_spice_destroy_host_primary(ssd);
|
||||
}
|
||||
if (ssd->ds) {
|
||||
ssd->surface = pixman_image_ref(ssd->ds->image);
|
||||
ssd->mirror = qemu_pixman_mirror_create(ssd->ds->format,
|
||||
ssd->ds->image);
|
||||
qemu_spice_create_host_primary(ssd);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user