mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-09 23:59:22 +00:00
* Fixed a bug caused by gcc-3.3.5 miscompiling the exception thrown in
rtorrent/src/core/download_list.cc:100. * Disable encryption support when compiling libtorrent with --without-openssl. Patch by Josef Drexler, public domain as per earlier agreement. * Converted torrent::HashQueue from std::list into a std::deque for better cache locality. * Fixed a bug that would cause storage errors to trigger an internal_error being wrongly thrown. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@828 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -95,9 +95,16 @@ DownloadList::create(std::istream* str, bool printLog) {
|
|||||||
try {
|
try {
|
||||||
*str >> *object;
|
*str >> *object;
|
||||||
|
|
||||||
// Catch, delete.
|
// Don't throw input_error from here as gcc-3.3.5 produces bad
|
||||||
if (str->fail())
|
// code.
|
||||||
throw torrent::input_error("Could not create download, the input is not a valid torrent.");
|
if (str->fail()) {
|
||||||
|
delete object;
|
||||||
|
|
||||||
|
if (printLog)
|
||||||
|
control->core()->push_log("Could not create download, the input is not a valid torrent.");
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
download = torrent::download_add(object);
|
download = torrent::download_add(object);
|
||||||
|
|
||||||
@@ -390,9 +397,6 @@ void
|
|||||||
DownloadList::hash_done(Download* download) {
|
DownloadList::hash_done(Download* download) {
|
||||||
check_contains(download);
|
check_contains(download);
|
||||||
|
|
||||||
if (!download->is_open())
|
|
||||||
throw torrent::internal_error("DownloadList::hash_done(...) !download->is_open().");
|
|
||||||
|
|
||||||
if (download->is_hash_checking() || download->is_active())
|
if (download->is_hash_checking() || download->is_active())
|
||||||
throw torrent::internal_error("DownloadList::hash_done(...) download in invalid state.");
|
throw torrent::internal_error("DownloadList::hash_done(...) download in invalid state.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user