Added logging, currently shows failed torrent creations but does not

time out the log messages.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@307 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-25 22:05:15 +00:00
parent f66424f642
commit 9fe97ee490
17 changed files with 220 additions and 21 deletions
+8 -1
View File
@@ -99,9 +99,15 @@ Manager::receive_http_done(CurlGet* http) {
} catch (torrent::local_error& e) {
// What to do? Keep in list for now.
m_log.push_front(e.what());
}
}
void
Manager::receive_http_failed(std::string msg) {
m_log.push_front("Http download error: \"" + msg + "\"");
}
void
Manager::create_file(const std::string& uri) {
try {
@@ -111,6 +117,7 @@ Manager::create_file(const std::string& uri) {
} catch (torrent::local_error& e) {
// What to do? Keep in list for now.
m_log.push_front(e.what());
}
}
@@ -119,7 +126,7 @@ Manager::create_http(const std::string& uri) {
core::HttpQueue::iterator itr = m_httpQueue.insert(uri);
(*itr)->signal_done().slots().push_front(sigc::bind(sigc::mem_fun(*this, &core::Manager::receive_http_done), *itr));
// Add the failed signal here.
(*itr)->signal_failed().slots().push_front(sigc::mem_fun(*this, &core::Manager::receive_http_failed));
}
Manager::iterator