summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-13 20:39:13 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-13 20:39:13 +0200
commitb1ea463843add37874f9768b606825504cdc8eb2 (patch)
treef71f94b967ddc7bf23a174b2ad37db0ffa80ab3d /src
parent481f0cdcd0fb33a35865dd8ab30aae6c74f84f20 (diff)
downloadpianobar-windows-b1ea463843add37874f9768b606825504cdc8eb2.tar.gz
pianobar-windows-b1ea463843add37874f9768b606825504cdc8eb2.tar.bz2
pianobar-windows-b1ea463843add37874f9768b606825504cdc8eb2.zip
Hopefully fixed wrong libxml2 usage
We did a xmlCleanupParser () call everytime we finished parsing; this is wrong (http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser)
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/main.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index fbd184c..20b5b40 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
bin_PROGRAMS = pianobar
pianobar_SOURCES = main.c
-pianobar_CPPFLAGS = ${LIBCURL_CFLAGS} ${LIBAO_CFLAGS} -I../libpiano
-pianobar_LDADD = ${LIBCURL_LIBS} ${LIBAO_LIBS} ${LIBFAAD_LIBS} ${LIBREADLINE_LIBS} -lpthread ../libpiano/libpiano.la
+pianobar_CPPFLAGS = ${LIBCURL_CFLAGS} ${LIBAO_CFLAGS} ${LIBXML_CFLAGS} -I../libpiano
+pianobar_LDADD = ${LIBCURL_LIBS} ${LIBAO_LIBS} ${LIBFAAD_LIBS} ${LIBREADLINE_LIBS} ${LIBXML_LIBS} -lpthread ../libpiano/libpiano.la
diff --git a/src/main.c b/src/main.c
index 0dcac22..314748f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,8 @@ THE SOFTWARE.
#include <piano.h>
#include <curl/curl.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -240,6 +242,7 @@ int main (int argc, char **argv) {
/* init some things */
curl_global_init (CURL_GLOBAL_SSL);
+ xmlInitParser ();
ao_initialize();
PianoInit (&ph);
@@ -384,6 +387,7 @@ int main (int argc, char **argv) {
PianoDestroy (&ph);
curl_global_cleanup ();
ao_shutdown();
+ xmlCleanupParser ();
return 0;
}