]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuBuildCommandLine: Don't add tlsPort if none set
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 8 Mar 2012 13:27:14 +0000 (14:27 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Mar 2012 07:49:10 +0000 (08:49 +0100)
If user hasn't supplied any tlsPort we default to setting it
to zero in our internal structure. However, when building command
line we test it against -1 which is obviously wrong.

src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-timeout.args

index 0ef3e3085584c11fe7717fae55264ce1a8e7c512..6ec1eb9ac819a57dd6e97b7cad79a5fe638792c5 100644 (file)
@@ -5375,7 +5375,7 @@ qemuBuildCommandLine(virConnectPtr conn,
 
         virBufferAsprintf(&opt, "port=%u", def->graphics[0]->data.spice.port);
 
-        if (def->graphics[0]->data.spice.tlsPort != -1) {
+        if (def->graphics[0]->data.spice.tlsPort) {
             if (!driver->spiceTLS) {
                 qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                 _("spice TLS port set in XML configuration,"
index 62ce46f7c7551a6eb0dd062762567a3de4b1c826..ebda714f0744d040544f12b88b8abfd4a837cf15 100644 (file)
@@ -10,6 +10,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
 -device rtl8139,vlan=0,id=net0,mac=52:54:00:71:70:89,bus=pci.0,addr=0x7 \
 -net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 -serial pty \
 -usb -device usb-tablet,id=input0 \
--spice port=5900,tls-port=0,x509-dir=/etc/pki/libvirt-spice -vga std \
+-spice port=5900,x509-dir=/etc/pki/libvirt-spice -vga std \
 -device AC97,id=sound0,bus=pci.0,addr=0x3 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5