diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-09-10 15:38:44 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-09-10 15:38:44 +0900 |
commit | 79b3a6b7ab494c5ff10e740fd147f21a04907907 (patch) | |
tree | 4d4a0edc3666922135d2d2a2e4a93dd2d695ce47 /ext/repo_deltainfoxml.c | |
parent | 26781f8c44b4495fba2d0f4a39fe6379b08f32ce (diff) | |
download | libsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.tar.gz libsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.tar.bz2 libsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.zip |
Imported Upstream version 0.7.2upstream/0.7.2
Diffstat (limited to 'ext/repo_deltainfoxml.c')
-rw-r--r-- | ext/repo_deltainfoxml.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/repo_deltainfoxml.c b/ext/repo_deltainfoxml.c index 4eb340f..ad315da 100644 --- a/ext/repo_deltainfoxml.c +++ b/ext/repo_deltainfoxml.c @@ -306,13 +306,6 @@ endElement(struct solv_xmlparser *xmlp, int state, char *content) } } -void -errorCallback(struct solv_xmlparser *xmlp, const char *errstr, unsigned int line, unsigned int column) -{ - struct parsedata *pd = xmlp->userdata; - pd->ret = pool_error(pd->pool, -1, "repo_deltainfoxml: %s at line %u:%u", errstr, line, column); -} - int repo_add_deltainfoxml(Repo *repo, FILE *fp, int flags) { @@ -327,8 +320,9 @@ repo_add_deltainfoxml(Repo *repo, FILE *fp, int flags) pd.pool = pool; pd.repo = repo; pd.data = data; - solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement, errorCallback); - solv_xmlparser_parse(&pd.xmlp, fp); + solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement); + if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK) + pd.ret = pool_error(pd.pool, -1, "repo_deltainfoxml: %s at line %u:%u", pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column); solv_xmlparser_free(&pd.xmlp); /* now commit all handles */ |