From 589bb541111e97610308fae1269a549d51c9ea6c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Sep 2010 21:40:30 +0200 Subject: input/curl: fix version check for curl_multi_timeout() According to the CURL web site, curl_multi_timeout() was added in version 7.15.4: http://curl.haxx.se/libcurl/c/curl_multi_timeout.html --- src/input/curl_input_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index c176f20dc..3893aef1c 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -259,7 +259,7 @@ input_curl_select(struct input_curl *c) return -1; } -#if LIBCURL_VERSION_NUM >= 0x070f00 +#if LIBCURL_VERSION_NUM >= 0x070f04 long timeout2; mcode = curl_multi_timeout(c->multi, &timeout2); if (mcode != CURLM_OK) { -- cgit v1.2.3 From 54294366d5fe47aba687fc791967596e31a26864 Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Wed, 22 Sep 2010 22:20:50 +0200 Subject: rewind_input_plugin: Update MIME not only once The assumption that MIME type is set only once is not valid with CURL, as URL redirections may update the MIME type. This fixes bug #3044. --- src/input/rewind_input_plugin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c index 0a874a29c..335ccf7e1 100644 --- a/src/input/rewind_input_plugin.c +++ b/src/input/rewind_input_plugin.c @@ -86,10 +86,11 @@ copy_attributes(struct input_stream *dest) dest->size = src->size; dest->offset = src->offset; - if (dest->mime == NULL && src->mime != NULL) - /* this is set only once, and the duplicated pointer - is freed by input_stream_close() */ + if (src->mime != NULL) { + if (dest->mime != NULL) + g_free(dest->mime); dest->mime = g_strdup(src->mime); + } } static void -- cgit v1.2.3 From e3f4c7b91cb25cc7d233b64de0e55ef2ab0d179b Mon Sep 17 00:00:00 2001 From: Thomas Jansen Date: Tue, 28 Sep 2010 12:56:47 +0200 Subject: input/rewind: enable for MMS --- src/input/rewind_input_plugin.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c index 335ccf7e1..43f0254c9 100644 --- a/src/input/rewind_input_plugin.c +++ b/src/input/rewind_input_plugin.c @@ -20,6 +20,9 @@ #include "config.h" #include "input/rewind_input_plugin.h" #include "input/curl_input_plugin.h" +#ifdef ENABLE_MMS +#include "input/mms_input_plugin.h" +#endif #include "input_plugin.h" #include "tag.h" @@ -220,7 +223,11 @@ input_rewind_open(struct input_stream *is) assert(is != NULL); assert(is->offset == 0); - if (is->plugin != &input_plugin_curl) + if (is->plugin != &input_plugin_curl +#ifdef ENABLE_MMS + && is->plugin != &input_plugin_mms +#endif + ) /* due to limitations in the input_plugin API, we only (explicitly) support the CURL input plugin */ return; @@ -230,7 +237,8 @@ input_rewind_open(struct input_stream *is) /* move the CURL input stream to c->input */ c->input = *is; - input_curl_reinit(&c->input); + if (is->plugin == &input_plugin_curl) + input_curl_reinit(&c->input); /* convert the existing input_stream pointer to a "rewind" input stream */ -- cgit v1.2.3