From: Adam Dickmeiss Date: Mon, 28 Jul 2008 07:23:03 +0000 (+0200) Subject: Fix Libxml2 error handling under Windows. X-Git-Tag: v3.0.38~40 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=dfe360ef9c3b9ae84a2812bed499c1ac1b84b16d Fix Libxml2 error handling under Windows. The call to yaz_log_xml_errors have been moved to new_session which is when a worker thread is active. Using xmlSetGenericError func and friends fails if set in mother thread. --- diff --git a/src/statserv.c b/src/statserv.c index e64ac97..9c252e7 100644 --- a/src/statserv.c +++ b/src/statserv.c @@ -998,6 +998,7 @@ static void *new_session(void *vp) COMSTACK new_line = (COMSTACK) vp; IOCHAN parent_chan = (IOCHAN) new_line->user; + yaz_log_xml_errors(0, YLOG_WARN); unsigned cs_get_mask, cs_accept_mask, mask = ((new_line->io_pending & CS_WANT_WRITE) ? EVENT_OUTPUT : 0) | ((new_line->io_pending & CS_WANT_READ) ? EVENT_INPUT : 0); @@ -1359,7 +1360,6 @@ int check_options(int argc, char **argv) yaz_log_init_level(yaz_log_mask_str(STAT_DEFAULT_LOG_LEVEL)); - yaz_log_xml_errors(0, YLOG_WARN); get_logbits(1); while ((ret = options("1a:iszSTl:v:u:c:w:t:k:d:A:p:DC:f:m:r:",