]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
parallels: fix parallelsDomainDefineXML for domains with VNC and autoport
authorDmitry Guryanov <dguryanov@parallels.com>
Mon, 10 Sep 2012 15:23:44 +0000 (19:23 +0400)
committerDaniel Veillard <veillard@redhat.com>
Wed, 12 Sep 2012 09:52:49 +0000 (17:52 +0800)
virDomainDefParseString assigns 0 to port if autoport enabled.
So fix code, which check different between old and new
configurations.

src/parallels/parallels_driver.c

index 06a75b353d82f2996976e25407e60246b89c770e..2d6883f78b4c37599622b7eed2f2eb89b58f0e66 100644 (file)
@@ -1185,7 +1185,7 @@ parallelsApplyGraphicsParams(virDomainGraphicsDefPtr *oldgraphics, int nold,
     new = newgraphics[0];
 
     if (old->data.vnc.port != new->data.vnc.port &&
-        (old->data.vnc.port != 0 && new->data.vnc.port != -1)) {
+        (old->data.vnc.port != 0 && new->data.vnc.port != 0)) {
 
         goto error;
     } else if (old->data.vnc.autoport != new->data.vnc.autoport ||