X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fstatserv.c;h=a0392513abaf51ef97704da821ecdb9808b0da97;hp=7560058b4c75180d26c0d0e3319100c0cfca2a50;hb=7d7e192def2fef342d235ea894eddb1e89edd714;hpb=c1250b6b91fc106645f28bff1d6188936434a494 diff --git a/src/statserv.c b/src/statserv.c index 7560058..a039251 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -15,7 +15,6 @@ #include #include #include -#include #ifdef WIN32 #include @@ -64,6 +63,7 @@ #include "session.h" #include #include +#include static IOCHAN pListener = NULL; @@ -195,7 +195,7 @@ static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr) cp = p->content; if (first) { - while(*cp && isspace(*cp)) + while(*cp && yaz_isspace(*cp)) cp++; if (*cp) first = 0; /* reset if we got non-whitespace out */ @@ -205,7 +205,7 @@ static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr) } /* remove trailing whitespace */ cp = strlen((const char *)str) + str; - while (cp != str && isspace(cp[-1])) + while (cp != str && yaz_isspace(cp[-1])) cp--; *cp = '\0'; /* return resulting string */ @@ -418,9 +418,14 @@ static void xml_config_read(void) } else if (!strcmp((const char *) ptr->name, "cql2rpn")) { - gfs->cql_transform = cql_transform_open_fname( - nmem_dup_xml_content(gfs_nmem, ptr->children) - ); + char *name = nmem_dup_xml_content(gfs_nmem, ptr->children); + gfs->cql_transform = cql_transform_open_fname(name); + if (!gfs->cql_transform) + { + yaz_log(YLOG_FATAL|YLOG_ERRNO, + "open CQL transform file '%s'", name); + exit(1); + } } else if (!strcmp((const char *) ptr->name, "ccl2rpn")) {