[telepathy-logger-0.8] telepathy-logger: Ask libxml2 to recover from errors of possible
Debarshi Ray
debarshir at kemper.freedesktop.org
Tue Apr 21 02:59:17 PDT 2015
Module: telepathy-logger
Branch: telepathy-logger-0.8
Commit: e10061d2a8708a70cab902dd8f65c4dd4e663930
URL: http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=e10061d2a8708a70cab902dd8f65c4dd4e663930
Author: Sjoerd Simons <sjoerd at luon.net>
Date: Sun Jan 5 14:16:55 2014 +0100
Ask libxml2 to recover from errors of possible
Let libxml2 try and recover on parse error instead to avoid crashes in
case logs can't be parsed fully.
Works around https://bugs.freedesktop.org/show_bug.cgi?id=40675
(cherry picked from commit 734af806917d67dada9fc591da1673edfe1a8cdd)
---
telepathy-logger/log-store-xml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index 03f5d3c..3951c93 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -1370,7 +1370,7 @@ log_store_xml_get_events_for_file (TplLogStoreXml *self,
ctxt = xmlNewParserCtxt ();
/* Parse and validate the file. */
- doc = xmlCtxtReadFile (ctxt, filename, NULL, 0);
+ doc = xmlCtxtReadFile (ctxt, filename, NULL, XML_PARSE_RECOVER);
if (!doc)
{
g_warning ("Failed to parse file:'%s'", filename);
More information about the telepathy-commits
mailing list