From: <mar...@us...> - 2010-05-28 05:47:10
|
Revision: 3306 http://navit.svn.sourceforge.net/navit/?rev=3306&view=rev Author: martin-s Date: 2010-05-28 05:47:03 +0000 (Fri, 28 May 2010) Log Message: ----------- Fix:Core:Better use fopen instead of open Modified Paths: -------------- trunk/navit/navit/xmlconfig.c Modified: trunk/navit/navit/xmlconfig.c =================================================================== --- trunk/navit/navit/xmlconfig.c 2010-05-26 09:54:09 UTC (rev 3305) +++ trunk/navit/navit/xmlconfig.c 2010-05-28 05:47:03 UTC (rev 3306) @@ -942,14 +942,14 @@ static gboolean parse_file(struct xmldocument *document, xmlerror **error) { - int fd; + FILE *f; ezxml_t root; - /* BUG workaround: ezxml parse file leaves negative fds unclosed */ - fd = open(document->href, O_RDONLY, 0); - if (fd == -1) + + f=fopen(document->href,"rb"); + if (!f) return FALSE; - root = ezxml_parse_fd(fd); - close(fd); + root = ezxml_parse_fp(f); + fclose(f); if (!root) return FALSE; document->active=document->xpointer ? 0:1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |