summaryrefslogtreecommitdiff
path: root/src/raptor_sax2.c
diff options
context:
space:
mode:
authorLauri Aalto <laalto@iki.fi>2012-02-01 15:40:05 +0200
committerLauri Aalto <laalto@iki.fi>2012-02-01 15:40:05 +0200
commit8c7e367055c6a9a62d0a2b4860a3dede25c30e91 (patch)
tree129d5b2867d591f965f34412cf95494929ed9152 /src/raptor_sax2.c
parent42c9537df33b6dbd6047980df280fbe13ba73d36 (diff)
downloadraptor-8c7e367055c6a9a62d0a2b4860a3dede25c30e91.tar.gz
(raptor_sax2_parse_chunk): Return parse errors to caller.
Fixes part of issue #0000488: http://bugs.librdf.org/mantis/view.php?id=488
Diffstat (limited to 'src/raptor_sax2.c')
-rw-r--r--src/raptor_sax2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/raptor_sax2.c b/src/raptor_sax2.c
index 439169f0..00b06862 100644
--- a/src/raptor_sax2.c
+++ b/src/raptor_sax2.c
@@ -562,11 +562,12 @@ raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer,
rc = XML_Parse(xp, (char*)buffer, 0, 1);
if(!rc) /* expat: 0 is failure */
goto handle_error;
+ return 0;
#endif
#ifdef RAPTOR_XML_LIBXML
- xmlParseChunk(xc, (char*)buffer, 0, 1);
+ rc = xmlParseChunk(xc, (char*)buffer, 0, 1);
+ return rc;
#endif
- return 0;
}
@@ -617,7 +618,7 @@ raptor_sax2_parse_chunk(raptor_sax2* sax2, const unsigned char *buffer,
return 0;
#endif
- return 0;
+ return rc;
#if defined(RAPTOR_XML_EXPAT) || defined(RAPTOR_XML_LIBXML)
handle_error: