diff options
author | Max Kellermann <max@duempel.org> | 2008-10-26 19:32:43 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-26 19:32:43 +0100 |
commit | 3609de8685cfdfbf2d01fb8bbff02a78d9c07d06 (patch) | |
tree | e5573fbdbb7a392abbb163a73318874ed615e03c /src/inputStream.c | |
parent | 6b09e4daefec2db743e4a0a9d7ff4ad86004d036 (diff) | |
download | mpd-3609de8685cfdfbf2d01fb8bbff02a78d9c07d06.tar.gz mpd-3609de8685cfdfbf2d01fb8bbff02a78d9c07d06.tar.xz mpd-3609de8685cfdfbf2d01fb8bbff02a78d9c07d06.zip |
http: use libcurl
MPD's HTTP client code has always been broken, no matter how effort
was put into fixing it. Replace it with libcurl, which is known to be
quite stable. This adds a fat library dependency, but only for people
who need streaming.
Diffstat (limited to '')
-rw-r--r-- | src/inputStream.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/inputStream.c b/src/inputStream.c index 1c5e027e9..b293cb1cd 100644 --- a/src/inputStream.c +++ b/src/inputStream.c @@ -17,20 +17,29 @@ */ #include "inputStream.h" +#include "config.h" #include "inputStream_file.h" -#include "inputStream_http.h" + +#ifdef HAVE_CURL +#include "input_curl.h" +#endif #include <stdlib.h> void initInputStream(void) { inputStream_initFile(); - inputStream_initHttp(); +#ifdef HAVE_CURL + input_curl_global_init(); +#endif } void input_stream_global_finish(void) { +#ifdef HAVE_CURL + input_curl_global_finish(); +#endif } int openInputStream(struct input_stream *inStream, char *url) @@ -46,8 +55,11 @@ int openInputStream(struct input_stream *inStream, char *url) if (inputStream_fileOpen(inStream, url) == 0) return 0; - if (inputStream_httpOpen(inStream, url) == 0) + +#ifdef HAVE_CURL + if (input_curl_open(inStream, url)) return 0; +#endif return -1; } |