mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Catch NULL returned by curl_easy_init() and fail, as there is no way to recover.
* Detect empty 'announce-list' and use 'announce' instead. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1200 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -69,6 +69,9 @@ CurlGet::start() {
|
|||||||
|
|
||||||
m_handle = curl_easy_init();
|
m_handle = curl_easy_init();
|
||||||
|
|
||||||
|
if (m_handle == NULL)
|
||||||
|
throw torrent::internal_error("Call to curl_easy_init() failed.");
|
||||||
|
|
||||||
curl_easy_setopt(m_handle, CURLOPT_URL, m_url.c_str());
|
curl_easy_setopt(m_handle, CURLOPT_URL, m_url.c_str());
|
||||||
curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write);
|
curl_easy_setopt(m_handle, CURLOPT_WRITEFUNCTION, &curl_get_receive_write);
|
||||||
curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);
|
curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user