From d0ec3f413d60ad2f8b7d75e4cf111ae275338f94 Mon Sep 17 00:00:00 2001 From: Petr Pisar Date: Sun, 8 Nov 2009 21:42:48 +0100 Subject: [PATCH] xpath_ctx initialization added to isds_CheckDataBox() TODO: Unify long int extraction --- src/isds.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/isds.c b/src/isds.c index ec6c855..1fa579d 100644 --- a/src/isds.c +++ b/src/isds.c @@ -1367,7 +1367,7 @@ isds_error isds_CheckDataBox(struct isds_ctx *context, const char *box_id, /* Request processed, but nothing found */ if (!xmlStrcmp(code, BAD_CAST "5001")) { - char *box_id = utf82locale((char*)box_id); + char *box_id_locale = utf82locale((char*)box_id); char *code_locale = utf82locale((char*)code); char *message_locale = utf82locale((char*)message); isds_log(ILF_ISDS, ILL_DEBUG, @@ -1396,6 +1396,16 @@ isds_error isds_CheckDataBox(struct isds_ctx *context, const char *box_id, goto leave; } + xpath_ctx = xmlXPathNewContext(response); + if (!xpath_ctx) { + err = IE_ERROR; + goto leave; + } + if (register_namespaces(xpath_ctx)) { + err = IE_ERROR; + goto leave; + } + leave: free(string); -- 2.11.4.GIT