commit fba991f645629444888e099c85d254a621991ac7 ("Fix compiler warning in curl_download.c") actually broke etag handling by only modifying the local pointer variable instead of the target it points to.
Signed-off-by: Sven Wegener <sven.wege...@stealer.net> --- src/curl_download.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/curl_download.c b/src/curl_download.c index afb4723..85aac91 100644 --- a/src/curl_download.c +++ b/src/curl_download.c @@ -62,14 +62,15 @@ static size_t curl_get_etag_func(char *ptr, size_t size, size_t nmemb, void *str { #define ETAG_KEYWORD "ETag: " #define ETAG_LEN (sizeof(ETAG_KEYWORD)-1) + gchar **etag = stream; size_t len = size*nmemb; char *str = g_strstr_len((const char*)ptr, len, ETAG_KEYWORD); if (str) { char *etag_str = str + ETAG_LEN; char *end_str = g_strstr_len(etag_str, len - ETAG_LEN, "\r\n"); if (etag_str && end_str) { - stream = (void*) g_strndup(etag_str, end_str - etag_str); - g_debug("%s: ETAG found: %s", __FUNCTION__, (gchar*)stream); + *etag = g_strndup(etag_str, end_str - etag_str); + g_debug("%s: ETAG found: %s", __FUNCTION__, *etag); } } return nmemb; -- 1.7.4.5 ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/