From 24af40698f1486c899333ea1f129e87590cdee7e Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 8 Jan 2010 19:56:21 +0100 Subject: Ported fprintf() -> log_append() on XML functions --- src/dmixml.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dmixml.c') diff --git a/src/dmixml.c b/src/dmixml.c index 5d9f1a1..6f1fd77 100644 --- a/src/dmixml.c +++ b/src/dmixml.c @@ -41,6 +41,7 @@ #include #include +#include "dmilog.h" #include "dmixml.h" /** @@ -323,7 +324,7 @@ inline char *dmixml_GetNodeContent(xmlNode *node, const char *key) { * which of the elements to be extracted. * @return char* Points at the return buffer if a value is found, otherwise NULL is returned. */ -char *dmixml_GetXPathContent(char *buf, size_t buflen, xmlXPathObject *xpo, int idx) { +char *dmixml_GetXPathContent(Log_t *logp, char *buf, size_t buflen, xmlXPathObject *xpo, int idx) { memset(buf, 0, buflen); if( xpo == NULL ) { @@ -351,9 +352,9 @@ char *dmixml_GetXPathContent(char *buf, size_t buflen, xmlXPathObject *xpo, int break; default: - fprintf(stderr, "dmixml_GetXPathContent(...):: " - "Do not know how to handle XPath type %i\n", - xpo->type); + log_append(logp, LOG_WARNING, "dmixml_GetXPathContent(...):: " + "Do not know how to handle XPath type %i\n", + xpo->type); return NULL; } return buf; -- cgit