Hi
The libvirt cannot specify VNC port number 5900.
Currently if we specify the port 5900,
The port number set to 5900+DomID.
This patch fixes the port number from 5900+DomID to 5900
for this case.
Signed-off-by: Nobuhiro Itou <fj0873gn(a)aa.jp.fujitsu.com>
Thanks,
Nobuhiro Itou.
Index: xml.c
===================================================================
RCS file: /data/cvs/libvirt/src/xml.c,v
retrieving revision 1.62
diff -u -p -r1.62 xml.c
--- xml.c 6 Mar 2007 20:00:17 -0000 1.62
+++ xml.c 8 Mar 2007 04:23:03 -0000
@@ -251,7 +251,7 @@ static int virDomainParseXMLGraphicsDesc
long port = strtol((const char *)vncport, NULL, 10);
if (port == -1)
virBufferAdd(buf, "(vncunused 1)", 13);
- else if (port > 5900)
+ else if (port >= 5900)
virBufferVSprintf(buf, "(vncdisplay %d)", port -
5900);
xmlFree(vncport);
}
@@ -315,7 +315,7 @@ static int virDomainParseXMLGraphicsDesc
long port = strtol((const char *)vncport, NULL, 10);
if (port == -1)
virBufferAdd(buf, "(vncunused 1)", 13);
- else if (port > 5900)
+ else if (port >= 5900)
virBufferVSprintf(buf, "(vncdisplay %d)", port - 5900);
xmlFree(vncport);
}