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

Pavel Hrdina phrdina at redhat.com
Thu May 12 05:23:43 UTC 2016


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 at redhat.com> 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 at redhat.com>
> > ---
> >  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




More information about the libvir-list mailing list