projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Choose IPV6 over IPV4 addrany addresses (bug #2350).
[yaz-moved-to-github.git]
/
src
/
libxml2_error.c
diff --git
a/src/libxml2_error.c
b/src/libxml2_error.c
index
e5b5ce0
..
d7abcf8
100644
(file)
--- a/
src/libxml2_error.c
+++ b/
src/libxml2_error.c
@@
-1,8
+1,6
@@
-/*
- * Copyright (C) 2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2008 Index Data
* See the file LICENSE for details.
* See the file LICENSE for details.
- *
- * $Id: libxml2_error.c,v 1.4 2007-02-23 10:15:01 adam Exp $
*/
/**
* \file libxml2_error.c
*/
/**
* \file libxml2_error.c
@@
-25,6
+23,7
@@
static int libxml2_error_level = 0;
static int libxml2_error_level = 0;
+#if YAZ_HAVE_XML2
static void proxy_xml_error_handler(void *ctx, const char *fmt, ...)
{
char buf[1024];
static void proxy_xml_error_handler(void *ctx, const char *fmt, ...)
{
char buf[1024];
@@
-37,15
+36,16
@@
static void proxy_xml_error_handler(void *ctx, const char *fmt, ...)
va_end (ap);
}
va_end (ap);
}
+#endif
int libxml2_error_to_yazlog(int level, const char *lead_msg)
{
libxml2_error_level = level;
int libxml2_error_to_yazlog(int level, const char *lead_msg)
{
libxml2_error_level = level;
+#if YAZ_HAVE_XML2
+ xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
#if YAZ_HAVE_XSLT
xsltSetGenericErrorFunc((void *) "XSLT", proxy_xml_error_handler);
#endif
#if YAZ_HAVE_XSLT
xsltSetGenericErrorFunc((void *) "XSLT", proxy_xml_error_handler);
#endif
-#if YAZ_HAVE_XML2
- xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
return 0;
#else
return -1;
return 0;
#else
return -1;