1 --- xbmc/FileSystem/FileCurl.cpp.orig 2009-11-23 01:12:07.000000000 -0800
2 +++ xbmc/FileSystem/FileCurl.cpp 2010-01-21 13:42:25.000000000 -0800
6 /* curl calls this routine to get more data */
7 -extern "C" size_t dummy_callback(char *buffer,
15 extern "C" size_t write_callback(char *buffer,
19 m_fileSize = m_filePos + (int64_t)length;
23 - if (CURLE_OK == g_curlInterface.easy_getinfo(m_easyHandle, CURLINFO_EFFECTIVE_URL, (char*)&url))
24 - m_strEffectiveUrl = url;
27 if (CURLE_OK == g_curlInterface.easy_getinfo(m_easyHandle, CURLINFO_RESPONSE_CODE, &response))
30 throw new CRedirectException(new CFileShoutcast);
33 - m_url = m_state->m_strEffectiveUrl;
35 m_multisession = false;
36 if(m_url.Left(5).Equals("http:") || m_url.Left(6).Equals("https:"))
39 SetRequestHeaders(m_state);
40 g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, 5);
41 g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_NOBODY, 0);
42 - g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEFUNCTION, (void*)dummy_callback);
43 g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FOLLOWLOCATION, 1);
44 g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, (void *)NULL); /* will cause write failure*/
48 // only attempt to fill buffer if transactions still running and buffer
49 // doesnt exceed required size already
50 - while ((unsigned int)m_buffer.GetMaxReadSize() < want && m_buffer.GetMaxWriteSize() > 0 && !g_application.m_bStop)
51 + while ((unsigned int)m_buffer.GetMaxReadSize() < want && m_buffer.GetMaxWriteSize() > 0 )