* Disable PEX when we are connected to enough peers.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@983 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-10-04 14:54:31 +00:00
parent 166e8e1357
commit 9cb48a9f66
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -392,6 +392,7 @@ initialize_command_download() {
ADD_CD_VALUE("is_hash_checking", rak::on(std::mem_fun(&core::Download::download), std::mem_fun(&torrent::Download::is_hash_checking)));
ADD_CD_VALUE("is_multi_file", rak::on(std::mem_fun(&core::Download::file_list), std::mem_fun(&torrent::FileList::is_multi_file)));
ADD_CD_VALUE("is_private", rak::on(std::mem_fun(&core::Download::download), std::mem_fun(&torrent::Download::is_private)));
ADD_CD_VALUE("is_pex_active", rak::on(std::mem_fun(&core::Download::download), std::mem_fun(&torrent::Download::is_pex_active)));
ADD_CD_VARIABLE_STRING_PUBLIC("custom1", "rtorrent", "custom1");
ADD_CD_VARIABLE_STRING_PUBLIC("custom2", "rtorrent", "custom2");
+4 -1
View File
@@ -160,7 +160,10 @@ Download::create_info() {
element->push_back("");
element->push_column("Chunks:", te_command("cat=$d.get_completed_chunks=,\" / \",$d.get_size_chunks=,\" * \",$d.get_chunk_size="));
element->push_column("Priority:", te_command("d.get_priority="));
element->push_column("Peer exchange:", te_command("cat=$if=$d.get_peer_exchange=\\,enabled\\,disabled,\\ (,$d.get_size_pex=,/,$d.get_max_size_pex=,)"));
// element->push_column("Peer exchange:", te_command("cat=$if=$d.get_peer_exchange=\\,enabled\\,disabled,\\ (,$d.get_size_pex=,/,$d.get_max_size_pex=,)"));
element->push_column("Peer exchange:", te_command("cat=$if=$d.get_peer_exchange=\\,enabled\\,disabled,\\ ,"
"$if=$d.is_pex_active=\\,active\\,inactive,"
"\\ (,$d.get_size_pex=,/,$d.get_max_size_pex=,)"));
element->push_column("State changed:", te_command("to_elapsed_time=$d.get_state_changed="));