* 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:
rakshasa
2006-12-18 15:32:31 +00:00
parent cc44fb175d
commit fbf1a8b8a6
+10 -6
View File
@@ -95,9 +95,16 @@ DownloadList::create(std::istream* str, bool printLog) {
try {
*str >> *object;
// Catch, delete.
if (str->fail())
throw torrent::input_error("Could not create download, the input is not a valid torrent.");
// Don't throw input_error from here as gcc-3.3.5 produces bad
// code.
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);
@@ -390,9 +397,6 @@ void
DownloadList::hash_done(Download* 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())
throw torrent::internal_error("DownloadList::hash_done(...) download in invalid state.");