mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 06:39:23 +00:00
* Remove stale lock files if it is held by the same hostname and the
pid is not running. * Added rak::timer::from_seconds(uint32_t) and converted all uses to this to avoid overflows etc. * For each cycle through the tracker list without any successfull connections, increase the timeout by 20 seconds. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@635 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -60,7 +60,7 @@ WindowDownloadList::~WindowDownloadList() {
|
||||
|
||||
void
|
||||
WindowDownloadList::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
|
||||
m_canvas->erase();
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ WindowDownloadStatusbar::WindowDownloadStatusbar(core::Download* d) :
|
||||
|
||||
void
|
||||
WindowDownloadStatusbar::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
|
||||
m_canvas->erase();
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ hack_wstring(const std::string& src) {
|
||||
|
||||
void
|
||||
WindowFileList::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 10 * 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(10)).round_seconds());
|
||||
m_canvas->erase();
|
||||
|
||||
if (m_download->get_download().size_file_entries() == 0 ||
|
||||
|
||||
@@ -58,7 +58,7 @@ WindowHttpQueue::WindowHttpQueue(core::HttpQueue* q) :
|
||||
|
||||
void
|
||||
WindowHttpQueue::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
|
||||
cleanup_list();
|
||||
|
||||
@@ -147,7 +147,7 @@ WindowHttpQueue::receive_erase(core::CurlGet* h) {
|
||||
throw std::logic_error("WindowHttpQueue::receive_erase(...) tried to remove an object we don't have");
|
||||
|
||||
itr->m_http = NULL;
|
||||
itr->m_timer = cachedTime + 10000000;
|
||||
itr->m_timer = cachedTime + rak::timer::from_seconds(1);
|
||||
|
||||
mark_dirty();
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ WindowLog::~WindowLog() {
|
||||
|
||||
WindowLog::iterator
|
||||
WindowLog::find_older() {
|
||||
return m_log->find_older(cachedTime - 60*1000000);
|
||||
return m_log->find_older(cachedTime - rak::timer::from_seconds(60));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -58,7 +58,7 @@ WindowLogComplete::~WindowLogComplete() {
|
||||
|
||||
WindowLogComplete::iterator
|
||||
WindowLogComplete::find_older() {
|
||||
return m_log->find_older(cachedTime - 60*1000000);
|
||||
return m_log->find_older(cachedTime - rak::timer::from_seconds(60));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -57,7 +57,7 @@ WindowPeerInfo::WindowPeerInfo(core::Download* d, PList* l, PList::iterator* f)
|
||||
|
||||
void
|
||||
WindowPeerInfo::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
m_canvas->erase();
|
||||
|
||||
int y = 0;
|
||||
|
||||
@@ -56,7 +56,7 @@ WindowPeerList::WindowPeerList(core::Download* d, PList* l, PList::iterator* f)
|
||||
|
||||
void
|
||||
WindowPeerList::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
m_canvas->erase();
|
||||
|
||||
int x = 2;
|
||||
|
||||
@@ -54,7 +54,7 @@ WindowStatusbar::WindowStatusbar(Control* c) :
|
||||
|
||||
void
|
||||
WindowStatusbar::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
|
||||
m_canvas->erase();
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ WindowTitle::WindowTitle(const std::string& s) :
|
||||
|
||||
void
|
||||
WindowTitle::redraw() {
|
||||
m_slotSchedule(this, (cachedTime + 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(1)).round_seconds());
|
||||
m_canvas->erase();
|
||||
|
||||
m_canvas->print(std::max(0, (m_canvas->get_width() - (int)m_title.size()) / 2 - 4), 0,
|
||||
|
||||
@@ -55,7 +55,7 @@ WindowTrackerList::WindowTrackerList(core::Download* d, unsigned int* focus) :
|
||||
void
|
||||
WindowTrackerList::redraw() {
|
||||
// TODO: Make this depend on tracker signal.
|
||||
m_slotSchedule(this, (cachedTime + 10 * 1000000).round_seconds());
|
||||
m_slotSchedule(this, (cachedTime + rak::timer::from_seconds(10)).round_seconds());
|
||||
m_canvas->erase();
|
||||
|
||||
int pos = 0;
|
||||
|
||||
Reference in New Issue
Block a user