* [PATCH] autoport overrides actual VNC port number in dump-xml
@ 2008-07-30 5:32 Charles Duffy
2008-07-30 9:14 ` Daniel P. Berrange
0 siblings, 1 reply; 2+ messages in thread
From: Charles Duffy @ 2008-07-30 5:32 UTC (permalink / raw)
To: kvm
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
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.
[-- Attachment #2: libvirt-fix-vnc-port-output.patch --]
[-- Type: text/x-diff, Size: 737 bytes --]
diff --git a/src/domain_conf.c b/src/domain_conf.c
index d629093..ece471e 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -2431,11 +2431,11 @@ virDomainGraphicsDefFormat(virConnectPtr conn,
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");
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30 5:32 [PATCH] autoport overrides actual VNC port number in dump-xml Charles Duffy
2008-07-30 9:14 ` Daniel P. Berrange
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox