public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] autoport overrides actual VNC port number in dump-xml
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2008-07-30  9:14 UTC (permalink / raw)
  To: Charles Duffy; +Cc: kvm

On Wed, Jul 30, 2008 at 12:32:57AM -0500, Charles Duffy wrote:
> 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.

You've got the wrong mailing list here - you want the libvirt list
at  libvir-list@redhat.com

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

^ permalink raw reply	[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