Per subject; if autoport is in use for a host, the current
virDomainGraphicsDefFormat code always emits "port=-1", even if a port
is assigned to the host; this leaves no way for a client to find the VNC
port assigned to the host in question.
This patches fixes it by putting the vncport in place if there is one, and
only putting "-1" if we fail that test.
+Thu Jul 31 14:27:00 CEST 2008 Chris Lalancette <clalance@redhat.com>
+
+ * src/domain_conf.c: patch from Charles Duffy to make sure we print
+ the "real" vncport if it exists instead of -1.
+
Wed Jul 30 11:18:50 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/qemu_driver.c: patch from Guido Günther, interface stats should
switch (def->type) {
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
- if (def->data.vnc.autoport)
- virBufferAddLit(buf, " port='-1'");
- else if (def->data.vnc.port)
+ if (def->data.vnc.port)
virBufferVSprintf(buf, " port='%d'",
def->data.vnc.port);
+ else if (def->data.vnc.autoport)
+ virBufferAddLit(buf, " port='-1'");
virBufferVSprintf(buf, " autoport='%s'",
def->data.vnc.autoport ? "yes" : "no");