* Removed core::HashQueue, using the "hashing" view and a function in

core::Manager instead.

* Added a new :rtorrent:hashing state so we can distinguish between
initial hashing and manual rehashes. The former is cleared if the
download is paused.

* Added a hash failed flag to core::Download. This is used to skip
entries in the hashing view that either failed to open or are in the
process of being erased from DownloadList.

* torrent::Bitfield::unset was incrementing, rather than decrementing,
the m_set counter.

* Replaced all torrent::internal_error's in rtorrent with
torrent::client_error.

* ^D now checks :rtorrent:state to decide whetever to stop or erase a
download. Downloads queued for hashing will now stop rather than be
deleted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@688 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-05-13 00:18:50 +00:00
parent 65f3dda9ab
commit d4706da4d5
22 changed files with 177 additions and 346 deletions
+7 -7
View File
@@ -62,7 +62,7 @@ ElementTrackerList::ElementTrackerList(core::Download* d) :
void
ElementTrackerList::activate(Control* c, MItr mItr) {
if (m_window != NULL)
throw torrent::internal_error("ui::ElementTrackerList::activate(...) called on an object in the wrong state");
throw torrent::client_error("ui::ElementTrackerList::activate(...) called on an object in the wrong state");
c->input()->push_front(&m_bindings);
@@ -72,7 +72,7 @@ ElementTrackerList::activate(Control* c, MItr mItr) {
void
ElementTrackerList::disable(Control* c) {
if (m_window == NULL)
throw torrent::internal_error("ui::ElementTrackerList::disable(...) called on an object in the wrong state");
throw torrent::client_error("ui::ElementTrackerList::disable(...) called on an object in the wrong state");
c->input()->erase(&m_bindings);
@@ -83,7 +83,7 @@ ElementTrackerList::disable(Control* c) {
void
ElementTrackerList::receive_disable() {
if (m_window == NULL)
throw torrent::internal_error("ui::ElementTrackerList::receive_disable(...) called on a disabled object");
throw torrent::client_error("ui::ElementTrackerList::receive_disable(...) called on a disabled object");
torrent::Tracker t = m_download->download()->tracker_list().get(m_focus);
@@ -98,7 +98,7 @@ ElementTrackerList::receive_disable() {
void
ElementTrackerList::receive_next() {
if (m_window == NULL)
throw torrent::internal_error("ui::ElementTrackerList::receive_next(...) called on a disabled object");
throw torrent::client_error("ui::ElementTrackerList::receive_next(...) called on a disabled object");
if (++m_focus >= m_download->download()->tracker_list().size())
m_focus = 0;
@@ -109,7 +109,7 @@ ElementTrackerList::receive_next() {
void
ElementTrackerList::receive_prev() {
if (m_window == NULL)
throw torrent::internal_error("ui::ElementTrackerList::receive_prev(...) called on a disabled object");
throw torrent::client_error("ui::ElementTrackerList::receive_prev(...) called on a disabled object");
if (m_download->download()->tracker_list().size() == 0)
return;
@@ -125,12 +125,12 @@ ElementTrackerList::receive_prev() {
void
ElementTrackerList::receive_cycle_group() {
if (m_window == NULL)
throw torrent::internal_error("ui::ElementTrackerList::receive_group_cycle(...) called on a disabled object");
throw torrent::client_error("ui::ElementTrackerList::receive_group_cycle(...) called on a disabled object");
torrent::TrackerList tl = m_download->download()->tracker_list();
if (m_focus >= tl.size())
throw torrent::internal_error("ui::ElementTrackerList::receive_group_cycle(...) called with an invalid focus");
throw torrent::client_error("ui::ElementTrackerList::receive_group_cycle(...) called with an invalid focus");
tl.cycle_group(tl.get(m_focus).group());