I quickly ran this with valgrind, before and after the change, and I see
no difference in valgrind's output. (not a valgrind expert)

thanks,
--mc

On Fri, 2006-02-24 at 15:16 -0500, Daniel Veillard wrote:
> 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
> 

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to