* Added event name to log printed when a download event fails.

* Made 'log_files.cc' printf statements cast uint64_t to 'long long unsigned int'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1245 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-07-19 08:46:10 +00:00
parent 4ff2793efb
commit dbde781bc5
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -74,6 +74,16 @@ DownloadList::check_contains(Download* d) {
#endif
}
void
DownloadList::trigger_event(Download* d, const char* event_name) {
try {
rpc::commands.call(event_name, rpc::make_target(d), torrent::Object());
} catch (torrent::input_error& e) {
control->core()->push_log(("Event '" + std::string(event_name) + "' failed: " + std::string(e.what())).c_str());
}
}
void
DownloadList::clear() {
std::for_each(begin(), end(), std::bind1st(std::mem_fun(&DownloadList::close), this));
+2
View File
@@ -155,6 +155,8 @@ private:
DownloadList(const DownloadList&);
void operator = (const DownloadList&);
void trigger_event(Download* d, const char* event_name);
void hash_done(Download* d);
void hash_queue(Download* d, int type);