Mercurial > audlegacy-plugins
diff src/curl/curl.c @ 961:25bc2010e9f0 trunk
[svn] - merge some local changes which makes curl threading more reliable.
author | nenolod |
---|---|
date | Sun, 15 Apr 2007 12:23:05 -0700 |
parents | 668110a6a412 |
children | f1642ee1115c |
line wrap: on
line diff
--- a/src/curl/curl.c Sun Apr 15 11:33:11 2007 -0700 +++ b/src/curl/curl.c Sun Apr 15 12:23:05 2007 -0700 @@ -36,12 +36,12 @@ #define DEBUG_OPEN_CLOSE 1 #define DEBUG_SEEK 0 #define DEBUG_READ 0 -#define DEBUG_HEADERS 0 +#define DEBUG_HEADERS 1 #define DEBUG_ICY 0 #define DEBUG_ICY_WRAP 0 #define DEBUG_ICY_VERBOSE 0 #define DEBUG_METADATA_REPORT 0 -#define DEBUG_CURL 1 +#define DEBUG_CURL 0 typedef struct _CurlHandle CurlHandle; @@ -201,7 +201,7 @@ if (strlen(header) > size) return FALSE; // XXXX wrapped headers - return !(strncmp(handle->buffer + handle->hdr_index, + return !(strncasecmp(handle->buffer + handle->hdr_index, header, strlen(header))); } @@ -503,6 +503,7 @@ handle->cancel = 1; g_cond_signal(handle->curl_cond); + handle->thread = NULL; return NULL; } @@ -525,7 +526,9 @@ handle->thread = g_thread_create(curl_manage_request, handle, TRUE, NULL); + g_mutex_lock(handle->curl_mutex); g_cond_wait(handle->curl_cond, handle->curl_mutex); + g_mutex_unlock(handle->curl_mutex); } }