Re: [PATCH v2 01/12] graphics: don't parse listens if socket attribute is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 11, 2016 at 08:12:48PM +0200, Marc-André Lureau wrote:
> Hi
> 
> On Wed, May 11, 2016 at 5:08 PM, Pavel Hrdina <phrdina@xxxxxxxxxx> wrote:
> > If socket attribute is present we start VNC that listens only on that
> > unix socket.  This makes the parser behave the same way as we actually
> > use the socket attribute.
> >
> > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> > ---
> >  src/conf/domain_conf.c                                            | 8 ++++++++
> >  .../genericxml2xmloutdata/generic-graphics-vnc-socket-listen.xml  | 4 +---
> >  2 files changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index 571b7bf..df2258a 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -10721,11 +10721,18 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
> >      xmlNodePtr save = ctxt->node;
> >      virDomainGraphicsListenDefPtr address = NULL;
> >      char *listenAddr = NULL;
> > +    char *socketPath = NULL;
> >      int nListens;
> >      int ret = -1;
> >
> >      ctxt->node = node;
> >
> > +    if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
> > +        (socketPath = virXMLPropString(node, "socket"))) {
> > +        ret = 0;
> > +        goto error;
> > +    }
> 
> Even if we keep the <listen> for compatibility purposes, perhaps there
> is a log/warning to give that it is ignored.

Hi, with old libvirt if vnc graphics had a socket attribute we've passed to qemu
only the socket, the <listen> element was ignored.  This only improve the domain
definition that we don't parse the <listen> element at all.  I don't think that
there should be log/warning.

Thanks for review

Pavel

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]