[libvirt] [Charles_Duffy at messageone.com: [PATCH] autoport overrides actual VNC port number in dump-xml]

Daniel P. Berrange berrange at redhat.com
Wed Jul 30 09:17:59 UTC 2008


Forwarding message that was sent to wrong list...

----- Forwarded message from Charles Duffy <Charles_Duffy at messageone.com> -----

> To: kvm at vger.kernel.org
> From: Charles Duffy <Charles_Duffy at messageone.com>
> Subject:  [PATCH] autoport overrides actual VNC port number in dump-xml
> Date: 	Wed, 30 Jul 2008 00:32:57 -0500
> 
> 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.
> 
> --------------090103050500010408080902
> Content-Type: text/x-diff;
>  name="libvirt-fix-vnc-port-output.patch"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
>  filename="libvirt-fix-vnc-port-output.patch"
> 
> 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");
> 
> --------------090103050500010408080902--
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
----- End forwarded message -----

-- 
|: 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 :|




More information about the libvir-list mailing list