From bfc2367621c165bf515ad2f974b6675a30868d62 Mon Sep 17 00:00:00 2001 From: Josh Davis Date: Mon, 15 Sep 2008 18:07:14 +1000 Subject: [PATCH] LT SYNC and README changes --- TODO | 5 ++++- libtorrent/include/libtorrent/session_settings.hpp | 2 +- libtorrent/src/kademlia/rpc_manager.cpp | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 37d8bd8..5aa91be 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,7 @@ Throttle per torrent +Fix TORC resizing crasher +FIX TORC crash when entering file view from torrent view sorted by size +Speed up transitions between views by caching last view Ablility to set UI settings and to specify output of list renderer -eg set the key order @@ -11,7 +14,7 @@ asr all seeding resume adp all downloading pause aqp all queued pause -ssu10 set session upload 10 +ssus10 set session upload 10 s set upload int diff --git a/libtorrent/include/libtorrent/session_settings.hpp b/libtorrent/include/libtorrent/session_settings.hpp index 071e0d5..3d48fbb 100644 --- a/libtorrent/include/libtorrent/session_settings.hpp +++ b/libtorrent/include/libtorrent/session_settings.hpp @@ -115,7 +115,7 @@ namespace libtorrent , max_outstanding_disk_bytes_per_connection(64 * 1024) , handshake_timeout(10) #ifndef TORRENT_DISABLE_DHT - , use_dht_as_fallback(true) + , use_dht_as_fallback(false) #endif , free_torrent_hashes(true) , upnp_ignore_nonrouters(true) diff --git a/libtorrent/src/kademlia/rpc_manager.cpp b/libtorrent/src/kademlia/rpc_manager.cpp index 3285577..c570599 100644 --- a/libtorrent/src/kademlia/rpc_manager.cpp +++ b/libtorrent/src/kademlia/rpc_manager.cpp @@ -307,7 +307,9 @@ time_duration rpc_manager::tick() if (m_next_transaction_id == m_oldest_transaction_id) return milliseconds(timeout_ms); - std::vector timeouts; + std::vector timeouts; + + time_duration ret = milliseconds(timeout_ms); for (;m_next_transaction_id != m_oldest_transaction_id; m_oldest_transaction_id = (m_oldest_transaction_id + 1) % max_transactions) @@ -321,8 +323,16 @@ time_duration rpc_manager::tick() time_duration diff = o->sent + milliseconds(timeout_ms) - time_now(); if (diff > seconds(0)) { - if (diff < seconds(1)) return seconds(1); - return diff; + if (diff < seconds(1)) + { + ret = seconds(1); + break; + } + else + { + ret = diff; + break; + } } try @@ -343,7 +353,7 @@ time_duration rpc_manager::tick() // generate new requests. We need to swap, since the // destrutors may add more observers to the m_aborted_transactions std::vector().swap(m_aborted_transactions); - return milliseconds(timeout_ms); + return ret; } unsigned int rpc_manager::new_transaction_id(observer_ptr o) -- 2.11.4.GIT