Re: [xml] sgi regression failure



On Fri, Feb 24, 2006 at 01:05:33PM -0700, Martin Cole wrote:

So this is broken on machines without the file /etc/xml/catalog

The new catalog is added fine in the default catalog, its child gets set
correctly, but the catalog->type gets set to XML_CATA_BROKEN_CATALOG
because the default catalog file doesnt exist.

  ohh, right !

So if I add:

    if (doregister) {
        catal->type = XML_CATA_CATALOG; //<<<--- newly added line
        cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL);
      if (cur != NULL)
          cur->children = catal->children;
    }

at line: 1549 of catalog.c it works.

I just don't know if this is too heavy handed, or if there is some other
way to set the default catalog. Any thoughts?

  I think that's fine. Could you just check with a memory debug tool that
we don't leak memory as a result of changing this ? This seems fine in my tests
but an extra check would be good.
  I applied it in my tree, I will commit soonish,

   thanks a lot !

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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