* 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:
rakshasa
2011-04-05 12:31:36 +00:00
parent 8bf3ab6e91
commit a3b763aba8
+3
View File
@@ -69,6 +69,9 @@ CurlGet::start() {
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_WRITEFUNCTION, &curl_get_receive_write);
curl_easy_setopt(m_handle, CURLOPT_WRITEDATA, this);