summaryrefslogtreecommitdiff
path: root/ext/repo_updateinfoxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/repo_updateinfoxml.c')
-rw-r--r--ext/repo_updateinfoxml.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c
index 7ba0062..ff84d32 100644
--- a/ext/repo_updateinfoxml.c
+++ b/ext/repo_updateinfoxml.c
@@ -427,13 +427,6 @@ endElement(struct solv_xmlparser *xmlp, int state, char *content)
}
}
-static 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_updateinfoxml: %s at line %u:%u", errstr, line, column);
-}
-
int
repo_add_updateinfoxml(Repo *repo, FILE *fp, int flags)
{
@@ -447,8 +440,9 @@ repo_add_updateinfoxml(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(pool, -1, "repo_updateinfoxml: %s at line %u:%u", pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);
solv_xmlparser_free(&pd.xmlp);
join_freemem(&pd.jd);