<tablewidth="100%"border="1"style="border-collapse: collapse;"><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(0)">../src/piece_picker.cpp:155</a></td><td>we need a different type to return to the outside here</td></tr><trid="0"style="display: none;"colspan="3"><tdcolspan="3"><h2>we need a different type to return to the outside here</h2><h4>../src/piece_picker.cpp:155</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
m_blocks_per_piece = blocks_per_piece;
m_blocks_in_last_piece = blocks_in_last_piece;
if (m_blocks_in_last_piece == 0) m_blocks_in_last_piece = blocks_per_piece;
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(1)">../src/kademlia/get_item.cpp:220</a></td><td>we don't support CAS errors here! we need a custom observer</td></tr><trid="1"style="display: none;"colspan="3"><tdcolspan="3"><h2>we don't support CAS errors here! we need a custom observer</h2><h4>../src/kademlia/get_item.cpp:220</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_LOG(node) << "sending put [ v: \"" << m_data.value()
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(2)">../src/peer_connection.cpp:2989</a></td><td>since we throw away the queue entry once we issue the disk job, this may happen. Instead, we should keep the queue entry around, mark it as having been requested from disk and once the disk job comes back, discard it if it has been cancelled. Maybe even be able to cancel disk jobs?</td></tr><trid="2"style="display: none;"colspan="3"><tdcolspan="3"><h2>since we throw away the queue entry once we issue
been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_connection.cpp:2989</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(3)">../src/peer_connection.cpp:4575</a></td><td>use a deadline_timer for timeouts. Don't rely on second_tick()! Hook this up to connect timeout as well. This would improve performance because of less work in second_tick(), and might let use remove ticking entirely eventually</td></tr><trid="3"style="display: none;"colspan="3"><tdcolspan="3"><h2>use a deadline_timer for timeouts. Don't rely on second_tick()!
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(4)">../src/piece_picker.cpp:1966</a></td><td>make the 2048 limit configurable</td></tr><trid="4"style="display: none;"colspan="3"><tdcolspan="3"><h2>make the 2048 limit configurable</h2><h4>../src/piece_picker.cpp:1966</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // only one of rarest_first or sequential can be set
// this will be filled with blocks that we should not request
// unless we can't find num_blocks among the other ones.
std::vector<piece_block> backup_blocks;
std::vector<piece_block> backup_blocks2;
const std::vector<int> empty_vector;
// When prefer_contiguous_blocks is set (usually set when downloading from
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(5)">../src/piece_picker.cpp:2575</a></td><td>the first_block returned here is the largest free range, not the first-fit range, which would be better</td></tr><trid="5"style="display: none;"colspan="3"><tdcolspan="3"><h2>the first_block returned here is the largest free range, not
the first-fit range, which would be better</h2><h4>../src/piece_picker.cpp:2575</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , end(m_block_info.end()); i != end; ++i)
if (info.state == piece_picker::block_info::state_requested
&& info.peer != 0)
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(6)">../src/piece_picker.cpp:3360</a></td><td>it would be nice if this could be folded into lock_piece() the main distinction is that this also maintains the m_num_passed counter and the passed_hash_check member Is there ever a case where we call write filed without also locking the piece? Perhaps write_failed() should imply locking it.</td></tr><trid="6"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice if this could be folded into lock_piece()
Is there ever a case where we call write filed without also locking
the piece? Perhaps write_failed() should imply locking it.</h2><h4>../src/piece_picker.cpp:3360</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> int state = m_piece_map[piece].download_queue();
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(7)">../src/session_impl.cpp:216</a></td><td>find a better place for this function</td></tr><trid="7"style="display: none;"colspan="3"><tdcolspan="3"><h2>find a better place for this function</h2><h4>../src/session_impl.cpp:216</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> *j.vec, j.peer->make_write_handler(boost::bind(
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(8)">../src/session_impl.cpp:1813</a></td><td>the udp socket(s) should be using the same generic mechanism and not be restricted to a single one we should open a one listen socket for each entry in the listen_interfaces list</td></tr><trid="8"style="display: none;"colspan="3"><tdcolspan="3"><h2>the udp socket(s) should be using the same generic
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(11)">../src/session_impl.cpp:3388</a></td><td>make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce</td></tr><trid="11"style="display: none;"colspan="3"><tdcolspan="3"><h2>make a list for torrents that want to be announced on the DHT so we
don't have to loop over all torrents, just to find the ones that want to announce</h2><h4>../src/session_impl.cpp:3388</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(13)">../src/torrent.cpp:4729</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><trid="13"style="display: none;"colspan="3"><tdcolspan="3"><h2>abort lookups this torrent has made via the
session host resolver interface</h2><h4>../src/torrent.cpp:4729</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(14)">../src/torrent.cpp:4873</a></td><td>the tracker login feature should probably be deprecated</td></tr><trid="14"style="display: none;"colspan="3"><tdcolspan="3"><h2>the tracker login feature should probably be deprecated</h2><h4>../src/torrent.cpp:4873</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (alerts().should_post<file_renamed_alert>())
if (m_username.empty() && m_password.empty()) return "";
return m_username + ":" + m_password;
}
boost::uint32_t torrent::tracker_key() const
{
uintptr_t self = (uintptr_t)this;
uintptr_t ses = (uintptr_t)&m_ses;
sha1_hash h = hasher((char*)&self, sizeof(self))
.update((char*)&m_storage, sizeof(m_storage))
.update((char*)&ses, sizeof(ses))
.final();
unsigned char const* ptr = &h[0];
return detail::read_uint32(ptr);
}
void torrent::cancel_non_critical()
{
std::set<int> time_critical;
for (std::vector<time_critical_piece>::iterator i = m_time_critical_pieces.begin()
, end(m_time_critical_pieces.end()); i != end; ++i)
{
time_critical.insert(i->piece);
}
for (std::vector<peer_connection*>::iterator i
= m_connections.begin(), end(m_connections.end()); i != end; ++i)
{
// for each peer, go through its download and request queue
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(15)">../src/torrent.cpp:7725</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><trid="15"style="display: none;"colspan="3"><tdcolspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:7725</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_LOGGING
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(16)">../src/tracker_manager.cpp:196</a></td><td>some of these arguments could probably be moved to the tracker request itself. like the ip_filter and settings</td></tr><trid="16"style="display: none;"colspan="3"><tdcolspan="3"><h2>some of these arguments could probably be moved to the
tracker request itself. like the ip_filter and settings</h2><h4>../src/tracker_manager.cpp:196</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , interval == 0 ? min_interval : interval);
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(18)">../src/utp_stream.cpp:348</a></td><td>it would be nice if not everything would have to be public here</td></tr><trid="18"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice if not everything would have to be public here</h2><h4>../src/utp_stream.cpp:348</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> void incoming(boost::uint8_t const* buf, int size, packet* p, ptime now);
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(19)">../src/web_peer_connection.cpp:628</a></td><td>just make this peer not have the pieces associated with the file we just requested. Only when it doesn't have any of the file do the following</td></tr><trid="19"style="display: none;"colspan="3"><tdcolspan="3"><h2>just make this peer not have the pieces
associated with the file we just requested. Only
when it doesn't have any of the file do the following</h2><h4>../src/web_peer_connection.cpp:628</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(20)">../src/web_peer_connection.cpp:687</a></td><td>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</td></tr><trid="20"style="display: none;"colspan="3"><tdcolspan="3"><h2>create a mapping of file-index to redirection URLs. Use that to form
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(21)">../src/kademlia/node.cpp:67</a></td><td>make this configurable in dht_settings</td></tr><trid="21"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/node.cpp:67</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/kademlia/routing_table.hpp"
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(22)">../src/kademlia/node.cpp:491</a></td><td>it would be nice to have a bias towards node-id prefixes that are missing in the bucket</td></tr><trid="22"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to have a bias towards node-id prefixes that
are missing in the bucket</h2><h4>../src/kademlia/node.cpp:491</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // this shouldn't happen
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(23)">../src/kademlia/node.cpp:581</a></td><td>use the non deprecated function instead of this one</td></tr><trid="23"style="display: none;"colspan="3"><tdcolspan="3"><h2>use the non deprecated function instead of this one</h2><h4>../src/kademlia/node.cpp:581</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> return d;
table_t::const_iterator i = m_map.lower_bound(info_hash);
if (i == m_map.end()) return;
if (i->first != info_hash) return;
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(24)">../src/kademlia/node.cpp:909</a></td><td>find_node should write directly to the response entry</td></tr><trid="24"style="display: none;"colspan="3"><tdcolspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:909</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_LOG(node) << " values: " << reply["values"].list().size();
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(25)">../src/kademlia/routing_table.cpp:110</a></td><td>use the non deprecated function instead of this one</td></tr><trid="25"style="display: none;"colspan="3"><tdcolspan="3"><h2>use the non deprecated function instead of this one</h2><h4>../src/kademlia/routing_table.cpp:110</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
for (table_t::const_iterator i = m_buckets.begin()
, end(m_buckets.end()); i != end; ++i)
{
nodes += i->live_nodes.size();
for (bucket_t::const_iterator k = i->live_nodes.begin()
, end(i->live_nodes.end()); k != end; ++k)
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(26)">../src/kademlia/routing_table.cpp:900</a></td><td>move the lowest priority nodes to the replacement bucket</td></tr><trid="26"style="display: none;"colspan="3"><tdcolspan="3"><h2>move the lowest priority nodes to the replacement bucket</h2><h4>../src/kademlia/routing_table.cpp:900</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> bucket_t& b = m_buckets[bucket_index].live_nodes;
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(27)">../include/libtorrent/enum_net.hpp:137</a></td><td>this could be done more efficiently by just looking up the interface with the given name, maybe even with if_nametoindex()</td></tr><trid="27"style="display: none;"colspan="3"><tdcolspan="3"><h2>this could be done more efficiently by just looking up
the interface with the given name, maybe even with if_nametoindex()</h2><h4>../include/libtorrent/enum_net.hpp:137</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
address ip = address::from_string(device_name, ec);
if (!ec)
{
bind_ep.address(ip);
// it appears to be an IP. Just bind to that address
sock.bind(bind_ep, ec);
return bind_ep.address();
}
ec.clear();
#ifdef SO_BINDTODEVICE
// try to use SO_BINDTODEVICE here, if that exists. If it fails,
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(28)">../include/libtorrent/piece_picker.hpp:599</a></td><td>having 8 priority levels is probably excessive. It should probably be changed to 3 levels + dont-download</td></tr><trid="28"style="display: none;"colspan="3"><tdcolspan="3"><h2>having 8 priority levels is probably excessive. It should
probably be changed to 3 levels + dont-download</h2><h4>../include/libtorrent/piece_picker.hpp:599</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // the number of peers that has this piece
// (availability)
#if TORRENT_OPTIMIZE_MEMORY_USAGE
boost::uint32_t peer_count : 9;
#else
boost::uint32_t peer_count : 16;
#endif
// one of the enums from state_t. This indicates whether this piece
// is currently being downloaded or not, and what state it's in if
// it is. Specifically, as an optimization, pieces that have all blocks
// requested from them are separated out into separate lists to make
// lookups quicker. The main oddity is that whether a downloading piece
// has only been requested from peers that are reverse, that's
// recorded as piece_downloading_reverse, which really means the same
// as piece_downloading, it just saves space to also indicate that it
// has a bit lower priority. The reverse bit is only relevant if the
// state is piece_downloadin.
boost::uint32_t download_state : 3;
<divstyle="background: #ffff00"width="100%">
</div> // is 0 if the piece is filtered (not to be downloaded)
// 1 is low priority
// 2 is low priority
// 3 is mid priority
// 4 is default priority
// 5 is mid priority
// 6 is high priority
// 7 is high priority
boost::uint32_t piece_priority : 3;
// index in to the piece_info vector
#if TORRENT_OPTIMIZE_MEMORY_USAGE
boost::uint32_t index : 17;
#else
boost::uint32_t index;
#endif
#ifdef TORRENT_DEBUG_REFCOUNTS
// all the peers that have this piece
std::set<const void*> have_peers;
#endif
enum
{
// index is set to this to indicate that we have the
// piece. There is no entry for the piece in the
// buckets if this is the case.
#if TORRENT_OPTIMIZE_MEMORY_USAGE
we_have_index = 0x3ffff,
#else
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(29)">../include/libtorrent/proxy_base.hpp:257</a></td><td>use the resolver interface that has a built-in cache</td></tr><trid="29"style="display: none;"colspan="3"><tdcolspan="3"><h2>use the resolver interface that has a built-in cache</h2><h4>../include/libtorrent/proxy_base.hpp:257</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> return m_sock.lowest_layer();
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(30)">../include/libtorrent/session.hpp:271</a></td><td>the ip filter should probably be saved here too</td></tr><trid="30"style="display: none;"colspan="3"><tdcolspan="3"><h2>the ip filter should probably be saved here too</h2><h4>../include/libtorrent/session.hpp:271</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(31)">../include/libtorrent/session_settings.hpp:55</a></td><td>this type is only used internally now. move it to an internal header and make this type properly deprecated.</td></tr><trid="31"style="display: none;"colspan="3"><tdcolspan="3"><h2>this type is only used internally now. move it to an internal
header and make this type properly deprecated.</h2><h4>../include/libtorrent/session_settings.hpp:55</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(32)">../include/libtorrent/socks5_stream.hpp:131</a></td><td>add async_connect() that takes a hostname and port as well</td></tr><trid="32"style="display: none;"colspan="3"><tdcolspan="3"><h2>add async_connect() that takes a hostname and port as well</h2><h4>../include/libtorrent/socks5_stream.hpp:131</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_dst_name.size() > 255)
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(33)">../include/libtorrent/tracker_manager.hpp:278</a></td><td>this class probably doesn't need to have virtual functions.</td></tr><trid="33"style="display: none;"colspan="3"><tdcolspan="3"><h2>this class probably doesn't need to have virtual functions.</h2><h4>../include/libtorrent/tracker_manager.hpp:278</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> int m_completion_timeout;
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(34)">../include/libtorrent/aux_/session_interface.hpp:130</a></td><td>the IP voting mechanism should be factored out to its own class, not part of the session</td></tr><trid="34"style="display: none;"colspan="3"><tdcolspan="3"><h2>the IP voting mechanism should be factored out
to its own class, not part of the session</h2><h4>../include/libtorrent/aux_/session_interface.hpp:130</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#endif
virtual void insert_torrent(sha1_hash const& ih, boost::shared_ptr<torrent> const& t
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(36)">../include/libtorrent/aux_/session_interface.hpp:210</a></td><td>factor out the thread pool for socket jobs into a separate class used to (potentially) issue socket write calls onto multiple threads</td></tr><trid="36"style="display: none;"colspan="3"><tdcolspan="3"><h2>factor out the thread pool for socket jobs into a separate
class
used to (potentially) issue socket write calls onto multiple threads</h2><h4>../include/libtorrent/aux_/session_interface.hpp:210</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> virtual int num_torrents() const = 0;
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(37)">../src/disk_io_thread.cpp:233</a></td><td>it would be nice to have the number of threads be set dynamically</td></tr><trid="37"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to have the number of threads be set dynamically</h2><h4>../src/disk_io_thread.cpp:233</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> std::pair<block_cache::iterator, block_cache::iterator> pieces
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(38)">../src/http_seed_connection.cpp:124</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><trid="38"style="display: none;"colspan="3"><tdcolspan="3"><h2>in chunked encoding mode, this assert won't hold.
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../src/http_seed_connection.cpp:124</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional<piece_block_progress>
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(39)">../src/session_impl.cpp:5210</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><trid="39"style="display: none;"colspan="3"><tdcolspan="3"><h2>report the proper address of the router as the source IP of
this understanding of our external address, instead of the empty address</h2><h4>../src/session_impl.cpp:5210</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(40)">../src/session_impl.cpp:6412</a></td><td>we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily</td></tr><trid="40"style="display: none;"colspan="3"><tdcolspan="3"><h2>we only need to do this if our global IPv4 address has changed
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6412</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(41)">../src/torrent.cpp:1157</a></td><td>make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file</td></tr><trid="41"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this depend on the error and on the filesystem the
up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1157</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> alerts().post_alert(file_error_alert(j->error.ec
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(42)">../src/torrent.cpp:6877</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><trid="42"style="display: none;"colspan="3"><tdcolspan="3"><h2>save the send_stats state instead of throwing them away
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:6877</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k < bits; ++k)
v |= (info[j*8+k].state == piece_picker::block_info::state_finished)
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(43)">../src/torrent.cpp:7970</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><trid="43"style="display: none;"colspan="3"><tdcolspan="3"><h2>should disconnect all peers that have the pieces we have
for all peers though</h2><h4>../src/torrent.cpp:7970</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> set_state(torrent_status::finished);
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(44)">../include/libtorrent/ip_voter.hpp:122</a></td><td>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</td></tr><trid="44"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</h2><h4>../include/libtorrent/ip_voter.hpp:122</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // away all the votes and started from scratch, in case
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(45)">../include/libtorrent/web_peer_connection.hpp:122</a></td><td>if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer</td></tr><trid="45"style="display: none;"colspan="3"><tdcolspan="3"><h2>if we make this be a disk_buffer_holder instead
use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../include/libtorrent/web_peer_connection.hpp:122</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(53)">../test/test_metadata_extension.cpp:91</a></td><td>it would be nice to test reversing which session is making the connection as well</td></tr><trid="53"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to test reversing
which session is making the connection as well</h2><h4>../test/test_metadata_extension.cpp:91</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , int timeout)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(54)">../test/test_peer_list.cpp:581</a></td><td>test erasing peers</td></tr><trid="54"style="display: none;"colspan="3"><tdcolspan="3"><h2>test erasing peers</h2><h4>../test/test_peer_list.cpp:581</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(55)">../test/test_peer_list.cpp:582</a></td><td>test logic for which connection to keep when receiving an incoming connection to the same peer as we just made an outgoing connection to</td></tr><trid="55"style="display: none;"colspan="3"><tdcolspan="3"><h2>test logic for which connection to keep when receiving an incoming
connection to the same peer as we just made an outgoing connection to</h2><h4>../test/test_peer_list.cpp:582</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(56)">../test/test_peer_list.cpp:584</a></td><td>test update_peer_port with allow_multiple_connections_per_ip and without</td></tr><trid="56"style="display: none;"colspan="3"><tdcolspan="3"><h2>test update_peer_port with allow_multiple_connections_per_ip and without</h2><h4>../test/test_peer_list.cpp:584</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(57)">../test/test_peer_list.cpp:585</a></td><td>test add i2p peers</td></tr><trid="57"style="display: none;"colspan="3"><tdcolspan="3"><h2>test add i2p peers</h2><h4>../test/test_peer_list.cpp:585</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(58)">../test/test_peer_list.cpp:586</a></td><td>test allow_i2p_mixed</td></tr><trid="58"style="display: none;"colspan="3"><tdcolspan="3"><h2>test allow_i2p_mixed</h2><h4>../test/test_peer_list.cpp:586</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(59)">../test/test_peer_list.cpp:587</a></td><td>test insert_peer failing with all error conditions</td></tr><trid="59"style="display: none;"colspan="3"><tdcolspan="3"><h2>test insert_peer failing with all error conditions</h2><h4>../test/test_peer_list.cpp:587</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(60)">../test/test_peer_list.cpp:588</a></td><td>test IPv6</td></tr><trid="60"style="display: none;"colspan="3"><tdcolspan="3"><h2>test IPv6</h2><h4>../test/test_peer_list.cpp:588</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(61)">../test/test_peer_list.cpp:589</a></td><td>test connect_to_peer() failing</td></tr><trid="61"style="display: none;"colspan="3"><tdcolspan="3"><h2>test connect_to_peer() failing</h2><h4>../test/test_peer_list.cpp:589</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(62)">../test/test_peer_list.cpp:590</a></td><td>test connection_closed</td></tr><trid="62"style="display: none;"colspan="3"><tdcolspan="3"><h2>test connection_closed</h2><h4>../test/test_peer_list.cpp:590</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TEST_EQUAL(p.num_peers(), 2);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(63)">../test/test_primitives.cpp:213</a></td><td>test the case where we have > 120 samples (and have the base delay actually be updated)</td></tr><trid="63"style="display: none;"colspan="3"><tdcolspan="3"><h2>test the case where we have > 120 samples (and have the base delay actually be updated)</h2><h4>../test/test_primitives.cpp:213</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(64)">../test/test_primitives.cpp:214</a></td><td>test the case where a sample is lower than the history entry but not lower than the base</td></tr><trid="64"style="display: none;"colspan="3"><tdcolspan="3"><h2>test the case where a sample is lower than the history entry but not lower than the base</h2><h4>../test/test_primitives.cpp:214</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TEST_CHECK(!filter.find(k3));
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(65)">../test/test_resume.cpp:340</a></td><td>test all other resume flags here too. This would require returning more than just the torrent_status from test_resume_flags. Also http seeds and trackers for instance</td></tr><trid="65"style="display: none;"colspan="3"><tdcolspan="3"><h2>test all other resume flags here too. This would require returning
and trackers for instance</h2><h4>../test/test_resume.cpp:340</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // resume data overrides the paused flag
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(66)">../test/test_rss.cpp:135</a></td><td>verify some key state is saved in 'state'</td></tr><trid="66"style="display: none;"colspan="3"><tdcolspan="3"><h2>verify some key state is saved in 'state'</h2><h4>../test/test_rss.cpp:135</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> feed_status st;
test_feed(combine_path(root_dir, "kat.xml"), rss_expect(25, "http://kat.ph/torrents/benito-di-paula-1975-benito-di-paula-lp-rip-ogg-at-500-jarax4u-t6194897/", "Benito Di Paula - 1975 - Benito Di Paula (LP Rip OGG at 500) [jarax4u]", 168773863));
test_feed(combine_path(root_dir, "mn.xml"), rss_expect(20, "http://www.mininova.org/get/13203100", "Dexcell - January TwentyTwelve Mix", 137311179));
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(67)">../test/test_ssl.cpp:377</a></td><td>test using a signed certificate with the wrong info-hash in DN</td></tr><trid="67"style="display: none;"colspan="3"><tdcolspan="3"><h2>test using a signed certificate with the wrong info-hash in DN</h2><h4>../test/test_ssl.cpp:377</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // in verifying peers
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(68)">../test/test_ssl.cpp:475</a></td><td>also test using a hash that refers to a valid torrent but that differs from the SNI hash</td></tr><trid="68"style="display: none;"colspan="3"><tdcolspan="3"><h2>also test using a hash that refers to a valid torrent
but that differs from the SNI hash</h2><h4>../test/test_ssl.cpp:475</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &on_alert);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(69)">../test/test_torrent.cpp:133</a></td><td>wait for an alert rather than just waiting 10 seconds. This is kind of silly</td></tr><trid="69"style="display: none;"colspan="3"><tdcolspan="3"><h2>wait for an alert rather than just waiting 10 seconds. This is kind of silly</h2><h4>../test/test_torrent.cpp:133</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TEST_EQUAL(h.file_priorities().size(), info->num_files());
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(70)">../test/test_torrent_parse.cpp:116</a></td><td>test remap_files</td></tr><trid="70"style="display: none;"colspan="3"><tdcolspan="3"><h2>test remap_files</h2><h4>../test/test_torrent_parse.cpp:116</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(71)">../test/test_torrent_parse.cpp:117</a></td><td>merkle torrents. specifically torrent_info::add_merkle_nodes and torrent with "root hash"</td></tr><trid="71"style="display: none;"colspan="3"><tdcolspan="3"><h2>merkle torrents. specifically torrent_info::add_merkle_nodes and torrent with "root hash"</h2><h4>../test/test_torrent_parse.cpp:117</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(72)">../test/test_torrent_parse.cpp:118</a></td><td>torrent with 'p' (padfile) attribute</td></tr><trid="72"style="display: none;"colspan="3"><tdcolspan="3"><h2>torrent with 'p' (padfile) attribute</h2><h4>../test/test_torrent_parse.cpp:118</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(73)">../test/test_torrent_parse.cpp:119</a></td><td>torrent with 'h' (hidden) attribute</td></tr><trid="73"style="display: none;"colspan="3"><tdcolspan="3"><h2>torrent with 'h' (hidden) attribute</h2><h4>../test/test_torrent_parse.cpp:119</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(74)">../test/test_torrent_parse.cpp:120</a></td><td>torrent with 'x' (executable) attribute</td></tr><trid="74"style="display: none;"colspan="3"><tdcolspan="3"><h2>torrent with 'x' (executable) attribute</h2><h4>../test/test_torrent_parse.cpp:120</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(75)">../test/test_torrent_parse.cpp:121</a></td><td>torrent with 'l' (symlink) attribute</td></tr><trid="75"style="display: none;"colspan="3"><tdcolspan="3"><h2>torrent with 'l' (symlink) attribute</h2><h4>../test/test_torrent_parse.cpp:121</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(76)">../test/test_torrent_parse.cpp:122</a></td><td>creating a merkle torrent (torrent_info::build_merkle_list)</td></tr><trid="76"style="display: none;"colspan="3"><tdcolspan="3"><h2>creating a merkle torrent (torrent_info::build_merkle_list)</h2><h4>../test/test_torrent_parse.cpp:122</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(77)">../test/test_torrent_parse.cpp:123</a></td><td>torrent with multiple trackers in multiple tiers, making sure we shuffle them (how do you test shuffling?, load it multiple times and make sure it's in different order at least once)</td></tr><trid="77"style="display: none;"colspan="3"><tdcolspan="3"><h2>torrent with multiple trackers in multiple tiers, making sure we shuffle them (how do you test shuffling?, load it multiple times and make sure it's in different order at least once)</h2><h4>../test/test_torrent_parse.cpp:123</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> { "invalid_info.torrent", errors::torrent_missing_info },
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(78)">../test/test_tracker.cpp:198</a></td><td>test parse peers6</td></tr><trid="78"style="display: none;"colspan="3"><tdcolspan="3"><h2>test parse peers6</h2><h4>../test/test_tracker.cpp:198</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(79)">../test/test_tracker.cpp:199</a></td><td>test parse tracker-id</td></tr><trid="79"style="display: none;"colspan="3"><tdcolspan="3"><h2>test parse tracker-id</h2><h4>../test/test_tracker.cpp:199</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(80)">../test/test_tracker.cpp:200</a></td><td>test parse failure-reason</td></tr><trid="80"style="display: none;"colspan="3"><tdcolspan="3"><h2>test parse failure-reason</h2><h4>../test/test_tracker.cpp:200</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(81)">../test/test_tracker.cpp:201</a></td><td>test all failure paths, including invalid bencoding not a dictionary no files entry in scrape response no info-hash entry in scrape response malformed peers in peer list of dictionaries uneven number of bytes in peers and peers6 string responses</td></tr><trid="81"style="display: none;"colspan="3"><tdcolspan="3"><h2>test all failure paths, including
uneven number of bytes in peers and peers6 string responses</h2><h4>../test/test_tracker.cpp:201</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TEST_EQUAL(ec, error_code());
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(82)">../test/test_transfer.cpp:288</a></td><td>factor out the disk-full test into its own unit test</td></tr><trid="82"style="display: none;"colspan="3"><tdcolspan="3"><h2>factor out the disk-full test into its own unit test</h2><h4>../test/test_transfer.cpp:288</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &on_alert);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(83)">../test/test_upnp.cpp:100</a></td><td>store the log and verify that some key messages are there</td></tr><trid="83"style="display: none;"colspan="3"><tdcolspan="3"><h2>store the log and verify that some key messages are there</h2><h4>../test/test_upnp.cpp:100</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> "USN:uuid:000f-66d6-7296000099dc::upnp:rootdevice\r\n"
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(84)">../test/web_seed_suite.cpp:366</a></td><td>file hashes don't work with the new torrent creator reading async</td></tr><trid="84"style="display: none;"colspan="3"><tdcolspan="3"><h2>file hashes don't work with the new torrent creator reading async</h2><h4>../test/web_seed_suite.cpp:366</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // corrupt the files now, so that the web seed will be banned
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(85)">../src/block_cache.cpp:884</a></td><td>it's somewhat expensive to iterate over this linked list. Presumably because of the random access of memory. It would be nice if pieces with no evictable blocks weren't in this list</td></tr><trid="85"style="display: none;"colspan="3"><tdcolspan="3"><h2>it's somewhat expensive
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(86)">../src/block_cache.cpp:948</a></td><td>this should probably only be done every n:th time</td></tr><trid="86"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should probably only be done every n:th time</h2><h4>../src/block_cache.cpp:948</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(87)">../src/block_cache.cpp:1693</a></td><td>create a holder for refcounts that automatically decrement</td></tr><trid="87"style="display: none;"colspan="3"><tdcolspan="3"><h2>create a holder for refcounts that automatically decrement</h2><h4>../src/block_cache.cpp:1693</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(88)">../src/bt_peer_connection.cpp:671</a></td><td>this could be optimized using knuth morris pratt</td></tr><trid="88"style="display: none;"colspan="3"><tdcolspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:671</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(90)">../src/choker.cpp:332</a></td><td>optimize this using partial_sort or something. We don't need to sort the entire list</td></tr><trid="90"style="display: none;"colspan="3"><tdcolspan="3"><h2>optimize this using partial_sort or something. We don't need
</div></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(91)">../src/choker.cpp:335</a></td><td>make the comparison function a free function and move it into this cpp file</td></tr><trid="91"style="display: none;"colspan="3"><tdcolspan="3"><h2>make the comparison function a free function and move it
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(93)">../src/choker.cpp:354</a></td><td>make configurable</td></tr><trid="93"style="display: none;"colspan="3"><tdcolspan="3"><h2>make configurable</h2><h4>../src/choker.cpp:354</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // it purely based on the current state of our peers.
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(94)">../src/disk_buffer_pool.cpp:329</a></td><td>perhaps we should sort the buffers here?</td></tr><trid="94"style="display: none;"colspan="3"><tdcolspan="3"><h2>perhaps we should sort the buffers here?</h2><h4>../src/disk_buffer_pool.cpp:329</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> mutex::scoped_lock l(m_pool_mutex);
if (m_free_list.size() <= (m_max_use - m_low_watermark)
/ 2 && !m_exceeded_max_size)
{
m_exceeded_max_size = true;
m_trigger_cache_trim();
}
if (m_free_list.empty()) return 0;
boost::uint64_t slot_index = m_free_list.back();
m_free_list.pop_back();
ret = m_cache_pool + (slot_index * 0x4000);
TORRENT_ASSERT(is_disk_buffer(ret, l));
}
else
#endif
{
#if defined TORRENT_DISABLE_POOL_ALLOCATOR
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(95)">../src/disk_io_thread.cpp:879</a></td><td>it would be nice to optimize this by having the cache pieces also ordered by</td></tr><trid="95"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to optimize this by having the cache
pieces also ordered by</h2><h4>../src/disk_io_thread.cpp:879</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // from disk_io_thread::do_delete, which is a fence job and should
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(96)">../src/disk_io_thread.cpp:922</a></td><td>instead of doing a lookup each time through the loop, save cached_piece_entry pointers with piece_refcount incremented to pin them</td></tr><trid="96"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of doing a lookup each time through the loop, save
cached_piece_entry pointers with piece_refcount incremented to pin them</h2><h4>../src/disk_io_thread.cpp:922</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // this is why we pass in 1 as cont_block to the flushing functions
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(97)">../src/disk_io_thread.cpp:1133</a></td><td>instead of doing this. pass in the settings to each storage_interface call. Each disk thread could hold its most recent understanding of the settings in a shared_ptr, and update it every time it wakes up from a job. That way each access to the settings won't require a mutex to be held.</td></tr><trid="97"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of doing this. pass in the settings to each storage_interface
each access to the settings won't require a mutex to be held.</h2><h4>../src/disk_io_thread.cpp:1133</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(98)">../src/disk_io_thread.cpp:1161</a></td><td>a potentially more efficient solution would be to have a special queue for retry jobs, that's only ever run when a job completes, in any thread. It would only work if counters::num_running_disk_jobs > 0</td></tr><trid="98"style="display: none;"colspan="3"><tdcolspan="3"><h2>a potentially more efficient solution would be to have a special
any thread. It would only work if counters::num_running_disk_jobs > 0</h2><h4>../src/disk_io_thread.cpp:1161</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(99)">../src/disk_io_thread.cpp:1175</a></td><td>it should clear the hash state even when there's an error, right?</td></tr><trid="99"style="display: none;"colspan="3"><tdcolspan="3"><h2>it should clear the hash state even when there's an error, right?</h2><h4>../src/disk_io_thread.cpp:1175</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> m_stats_counters.inc_stats_counter(counters::num_running_disk_jobs, -1);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(100)">../src/disk_io_thread.cpp:1870</a></td><td>maybe the tailqueue_iterator should contain a pointer-pointer instead and have an unlink function</td></tr><trid="100"style="display: none;"colspan="3"><tdcolspan="3"><h2>maybe the tailqueue_iterator should contain a pointer-pointer
instead and have an unlink function</h2><h4>../src/disk_io_thread.cpp:1870</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> j->callback = handler;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(101)">../src/disk_io_thread.cpp:2125</a></td><td>this is potentially very expensive. One way to solve it would be to have a fence for just this one piece.</td></tr><trid="101"style="display: none;"colspan="3"><tdcolspan="3"><h2>this is potentially very expensive. One way to solve
it would be to have a fence for just this one piece.</h2><h4>../src/disk_io_thread.cpp:2125</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(102)">../src/disk_io_thread.cpp:2386</a></td><td>we should probably just hang the job on the piece and make sure the hasher gets kicked</td></tr><trid="102"style="display: none;"colspan="3"><tdcolspan="3"><h2>we should probably just hang the job on the piece and make sure the hasher gets kicked</h2><h4>../src/disk_io_thread.cpp:2386</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (pe == NULL)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(103)">../src/disk_io_thread.cpp:2456</a></td><td>introduce a holder class that automatically increments and decrements the piece_refcount</td></tr><trid="103"style="display: none;"colspan="3"><tdcolspan="3"><h2>introduce a holder class that automatically increments
and decrements the piece_refcount</h2><h4>../src/disk_io_thread.cpp:2456</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (int i = ph->offset / block_size; i < blocks_in_piece; ++i)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(104)">../src/disk_io_thread.cpp:2698</a></td><td>it would be nice to not have to lock the mutex every turn through this loop</td></tr><trid="104"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to not have to lock the mutex every
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(106)">../src/metadata_transfer.cpp:359</a></td><td>this is not safe. The torrent could be unloaded while we're still sending the metadata</td></tr><trid="106"style="display: none;"colspan="3"><tdcolspan="3"><h2>this is not safe. The torrent could be unloaded while
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(107)">../src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><trid="107"style="display: none;"colspan="3"><tdcolspan="3"><h2>use compare_less_wrap for this comparison as well</h2><h4>../src/packet_buffer.cpp:176</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> while (new_size < size)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(108)">../src/part_file.cpp:252</a></td><td>what do we do if someone is currently reading from the disk from this piece? does it matter? Since we won't actively erase the data from disk, but it may be overwritten soon, it's probably not that big of a deal</td></tr><trid="108"style="display: none;"colspan="3"><tdcolspan="3"><h2>what do we do if someone is currently reading from the disk
from this piece? does it matter? Since we won't actively erase the
data from disk, but it may be overwritten soon, it's probably not that
big of a deal</h2><h4>../src/part_file.cpp:252</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (((mode & file::rw_mask) != file::read_only)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(109)">../src/part_file.cpp:344</a></td><td>instead of rebuilding the whole file header and flushing it, update the slot entries as we go</td></tr><trid="109"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of rebuilding the whole file header
and flushing it, update the slot entries as we go</h2><h4>../src/part_file.cpp:344</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (block_to_copy == m_piece_size)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(110)">../src/peer_connection.cpp:1017</a></td><td>this should be the global download rate</td></tr><trid="110"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should be the global download rate</h2><h4>../src/peer_connection.cpp:1017</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(111)">../src/peer_connection.cpp:3226</a></td><td>sort the allowed fast set in priority order</td></tr><trid="111"style="display: none;"colspan="3"><tdcolspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:3226</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(112)">../src/peer_connection.cpp:5870</a></td><td>The stats checks can not be honored when authenticated encryption is in use because we may have encrypted data which we cannot authenticate yet</td></tr><trid="112"style="display: none;"colspan="3"><tdcolspan="3"><h2>The stats checks can not be honored when authenticated encryption is in use
because we may have encrypted data which we cannot authenticate yet</h2><h4>../src/peer_connection.cpp:5870</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_LOGGING
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(113)">../src/piece_picker.cpp:2040</a></td><td>this could probably be optimized by incrementally calling partial_sort to sort one more element in the list. Because chances are that we'll just need a single piece, and once we've picked from it we're done. Sorting the rest of the list in that case is a waste of time.</td></tr><trid="113"style="display: none;"colspan="3"><tdcolspan="3"><h2>this could probably be optimized by incrementally
calling partial_sort to sort one more element in the list. Because
chances are that we'll just need a single piece, and once we've
picked from it we're done. Sorting the rest of the list in that
case is a waste of time.</h2><h4>../src/piece_picker.cpp:2040</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , end(m_downloads[piece_pos::piece_downloading].end()); i != end; ++i)
for (std::vector<int>::const_iterator i = suggested_pieces.begin();
i != suggested_pieces.end(); ++i)
{
// in time critical mode, only pick high priority pieces
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(114)">../src/piece_picker.cpp:2545</a></td><td>when expanding pieces for cache stripe reasons, the !downloading condition doesn't make much sense</td></tr><trid="114"style="display: none;"colspan="3"><tdcolspan="3"><h2>when expanding pieces for cache stripe reasons,
the !downloading condition doesn't make much sense</h2><h4>../src/piece_picker.cpp:2545</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(index < (int)m_piece_map.size() || m_piece_map.empty());
// the first bool is true if this is the only peer that has requested and downloaded
// blocks from this piece.
// the second bool is true if this is the only active peer that is requesting
// and downloading blocks from this piece. Active means having a connection.
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(115)">../src/session_impl.cpp:512</a></td><td>there's no rule here to make uTP connections not have the global or local rate limits apply to it. This used to be the default.</td></tr><trid="115"style="display: none;"colspan="3"><tdcolspan="3"><h2>there's no rule here to make uTP connections not have the global or
local rate limits apply to it. This used to be the default.</h2><h4>../src/session_impl.cpp:512</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> m_global_class = m_classes.new_peer_class("global");
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(116)">../src/session_impl.cpp:1727</a></td><td>instead of having a special case for this, just make the default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use the generic path. That would even allow for not listening at all.</td></tr><trid="116"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of having a special case for this, just make the
the generic path. That would even allow for not listening at all.</h2><h4>../src/session_impl.cpp:1727</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(117)">../src/session_impl.cpp:2620</a></td><td>should this function take a shared_ptr instead?</td></tr><trid="117"style="display: none;"colspan="3"><tdcolspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2620</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(118)">../src/session_impl.cpp:2985</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><trid="118"style="display: none;"colspan="3"><tdcolspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:2985</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler < 0)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(119)">../src/session_impl.cpp:3015</a></td><td>this should apply to all bandwidth channels</td></tr><trid="119"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3015</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#if TORRENT_DEBUG_STREAMING > 0
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(120)">../src/session_impl.cpp:3496</a></td><td>these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.</td></tr><trid="120"style="display: none;"colspan="3"><tdcolspan="3"><h2>these vectors could be copied from m_torrent_lists,
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(121)">../src/session_impl.cpp:3573</a></td><td>allow extensions to sort torrents for queuing</td></tr><trid="121"style="display: none;"colspan="3"><tdcolspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:3573</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (t->is_finished())
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(122)">../src/session_impl.cpp:3746</a></td><td>use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections</td></tr><trid="122"style="display: none;"colspan="3"><tdcolspan="3"><h2>use a lower limit than m_settings.connections_limit
connections</h2><h4>../src/session_impl.cpp:3746</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(123)">../src/session_impl.cpp:3889</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><trid="123"style="display: none;"colspan="3"><tdcolspan="3"><h2>post a message to have this happen
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:3889</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> torrent* t = p->associated_torrent().lock().get();
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(124)">../src/session_impl.cpp:3936</a></td><td>this should be called for all peers!</td></tr><trid="124"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should be called for all peers!</h2><h4>../src/session_impl.cpp:3936</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , unchoke_interval, m_settings);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(125)">../src/session_impl.cpp:4327</a></td><td>it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back</td></tr><trid="125"style="display: none;"colspan="3"><tdcolspan="3"><h2>it might be a nice feature here to limit the number of torrents
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(126)">../src/storage.cpp:716</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info</td></tr><trid="126"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this more generic to not just work if files have been
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>../src/storage.cpp:716</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (;;)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(127)">../src/storage.cpp:1012</a></td><td>if everything moves OK, except for the partfile we currently won't update the save path, which breaks things. it would probably make more sense to give up on the partfile</td></tr><trid="127"style="display: none;"colspan="3"><tdcolspan="3"><h2>if everything moves OK, except for the partfile
it would probably make more sense to give up on the partfile</h2><h4>../src/storage.cpp:1012</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (ec)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(128)">../src/torrent.cpp:508</a></td><td>if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.</td></tr><trid="128"style="display: none;"colspan="3"><tdcolspan="3"><h2>if the existing torrent doesn't have metadata, insert
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(129)">../src/torrent.cpp:659</a></td><td>if the existing torrent doesn't have metadata, insert the metadata we just downloaded into it.</td></tr><trid="129"style="display: none;"colspan="3"><tdcolspan="3"><h2>if the existing torrent doesn't have metadata, insert
the metadata we just downloaded into it.</h2><h4>../src/torrent.cpp:659</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> m_torrent_file = tf;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(130)">../src/torrent.cpp:1461</a></td><td>is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash</td></tr><trid="130"style="display: none;"colspan="3"><tdcolspan="3"><h2>is verify_peer_cert called once per certificate in the chain, and
need to be verified to make sure its DN matches the info-hash</h2><h4>../src/torrent.cpp:1461</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (pp) p->add_extension(pp);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(131)">../src/torrent.cpp:1865</a></td><td>instead of creating the picker up front here, maybe this whole section should move to need_picker()</td></tr><trid="131"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of creating the picker up front here,
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(132)">../src/torrent.cpp:2061</a></td><td>there may be peer extensions relying on the torrent extension still being alive. Only do this if there are no peers. And when the last peer is disconnected, if the torrent is unloaded, clear the extensions m_extensions.clear();</td></tr><trid="132"style="display: none;"colspan="3"><tdcolspan="3"><h2>there may be peer extensions relying on the torrent extension
m_extensions.clear();</h2><h4>../src/torrent.cpp:2061</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // pinned torrents are not allowed to be swapped out
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(133)">../src/torrent.cpp:2736</a></td><td>this pattern is repeated in a few places. Factor this into a function and generalize the concept of a torrent having a dedicated listen port</td></tr><trid="133"style="display: none;"colspan="3"><tdcolspan="3"><h2>this pattern is repeated in a few places. Factor this into
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(134)">../src/torrent.cpp:3515</a></td><td>add one peer per IP the hostname resolves to</td></tr><trid="134"style="display: none;"colspan="3"><tdcolspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3515</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(136)">../src/torrent.cpp:4652</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><trid="136"style="display: none;"colspan="3"><tdcolspan="3"><h2>really, we should just keep the picker around
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4652</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(137)">../src/torrent.cpp:6625</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><trid="137"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(138)">../src/torrent.cpp:6743</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><trid="138"style="display: none;"colspan="3"><tdcolspan="3"><h2>if this is a merkle torrent and we can't
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(139)">../src/torrent.cpp:6934</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><trid="139"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(140)">../src/torrent.cpp:8936</a></td><td>add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file</td></tr><trid="140"style="display: none;"colspan="3"><tdcolspan="3"><h2>add a flag to ignore stats, and only care about resume data for
just to save an empty resume data file</h2><h4>../src/torrent.cpp:8936</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(141)">../src/torrent.cpp:10546</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><trid="141"style="display: none;"colspan="3"><tdcolspan="3"><h2>instead of resorting the whole list, insert the peers
directly into the right place</h2><h4>../src/torrent.cpp:10546</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(142)">../src/torrent_peer.cpp:176</a></td><td>how do we deal with our external address changing?</td></tr><trid="142"style="display: none;"colspan="3"><tdcolspan="3"><h2>how do we deal with our external address changing?</h2><h4>../src/torrent_peer.cpp:176</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , is_v6_addr(false)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(143)">../src/udp_socket.cpp:286</a></td><td>it would be nice to detect this on posix systems also</td></tr><trid="143"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to detect this on posix systems also</h2><h4>../src/udp_socket.cpp:286</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> --m_v6_outstanding;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(144)">../src/udp_socket.cpp:777</a></td><td>use the system resolver_interface here</td></tr><trid="144"style="display: none;"colspan="3"><tdcolspan="3"><h2>use the system resolver_interface here</h2><h4>../src/udp_socket.cpp:777</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(145)">../src/upnp.cpp:71</a></td><td>listen_interface is not used. It's meant to bind the broadcast socket</td></tr><trid="145"style="display: none;"colspan="3"><tdcolspan="3"><h2>listen_interface is not used. It's meant to bind the broadcast socket</h2><h4>../src/upnp.cpp:71</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#include <asio/ip/multicast.hpp>
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(146)">../src/ut_metadata.cpp:316</a></td><td>we really need to increment the refcounter on the torrent while this buffer is still in the peer's send buffer</td></tr><trid="146"style="display: none;"colspan="3"><tdcolspan="3"><h2>we really need to increment the refcounter on the torrent
while this buffer is still in the peer's send buffer</h2><h4>../src/ut_metadata.cpp:316</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_tp.need_loaded()) return;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(147)">../src/utp_stream.cpp:1644</a></td><td>this loop may not be very efficient</td></tr><trid="147"style="display: none;"colspan="3"><tdcolspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1644</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(148)">../src/web_connection_base.cpp:73</a></td><td>introduce a web-seed default class which has a low download priority</td></tr><trid="148"style="display: none;"colspan="3"><tdcolspan="3"><h2>introduce a web-seed default class which has a low download priority</h2><h4>../src/web_connection_base.cpp:73</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">{
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(149)">../src/kademlia/dht_tracker.cpp:295</a></td><td>ideally this function would be called when the put completes</td></tr><trid="149"style="display: none;"colspan="3"><tdcolspan="3"><h2>ideally this function would be called when the
put completes</h2><h4>../src/kademlia/dht_tracker.cpp:295</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // since it controls whether we re-put the content
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(151)">../include/libtorrent/block_cache.hpp:213</a></td><td>make this 32 bits and to count seconds since the block cache was created</td></tr><trid="151"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this 32 bits and to count seconds since the block cache was created</h2><h4>../include/libtorrent/block_cache.hpp:213</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(153)">../include/libtorrent/disk_buffer_pool.hpp:134</a></td><td>try to remove the observers, only using the async_allocate handlers</td></tr><trid="153"style="display: none;"colspan="3"><tdcolspan="3"><h2>try to remove the observers, only using the async_allocate handlers</h2><h4>../include/libtorrent/disk_buffer_pool.hpp:134</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(154)">../include/libtorrent/file.hpp:168</a></td><td>move this into a separate header file, TU pair</td></tr><trid="154"style="display: none;"colspan="3"><tdcolspan="3"><h2>move this into a separate header file, TU pair</h2><h4>../include/libtorrent/file.hpp:168</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_EXTRA_EXPORT bool is_root_path(std::string const& f);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(155)">../include/libtorrent/peer_connection.hpp:205</a></td><td>make this a raw pointer (to save size in the first cache line) and make the constructor take a raw pointer. torrent objects should always outlive their peers</td></tr><trid="155"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this a raw pointer (to save size in
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(156)">../include/libtorrent/peer_connection.hpp:1055</a></td><td>factor this out into its own class with a virtual interface torrent and session should implement this interface</td></tr><trid="156"style="display: none;"colspan="3"><tdcolspan="3"><h2>factor this out into its own class with a virtual interface
torrent and session should implement this interface</h2><h4>../include/libtorrent/peer_connection.hpp:1055</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(157)">../include/libtorrent/peer_connection_interface.hpp:45</a></td><td>make this interface smaller!</td></tr><trid="157"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this interface smaller!</h2><h4>../include/libtorrent/peer_connection_interface.hpp:45</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(158)">../include/libtorrent/performance_counters.hpp:132</a></td><td>should keepalives be in here too? how about dont-have, share-mode, upload-only</td></tr><trid="158"style="display: none;"colspan="3"><tdcolspan="3"><h2>should keepalives be in here too?
how about dont-have, share-mode, upload-only</h2><h4>../include/libtorrent/performance_counters.hpp:132</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // a connect candidate
connection_attempt_loops,
// successful incoming connections (not rejected for any reason)
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(159)">../include/libtorrent/performance_counters.hpp:442</a></td><td>some space could be saved here by making gauges 32 bits</td></tr><trid="159"style="display: none;"colspan="3"><tdcolspan="3"><h2>some space could be saved here by making gauges 32 bits</h2><h4>../include/libtorrent/performance_counters.hpp:442</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(160)">../include/libtorrent/performance_counters.hpp:443</a></td><td>restore these to regular integers. Instead have one copy of the counters per thread and collect them at convenient synchronization points</td></tr><trid="160"style="display: none;"colspan="3"><tdcolspan="3"><h2>restore these to regular integers. Instead have one copy
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(161)">../include/libtorrent/piece_picker.hpp:761</a></td><td>should this be allocated lazily?</td></tr><trid="161"style="display: none;"colspan="3"><tdcolspan="3"><h2>should this be allocated lazily?</h2><h4>../include/libtorrent/piece_picker.hpp:761</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
// this holds the information of the blocks in partially downloaded
// pieces. the downloading_piece::info index point into this vector for
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(162)">../include/libtorrent/proxy_base.hpp:171</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><trid="162"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(163)">../include/libtorrent/receive_buffer.hpp:255</a></td><td>Detect when the start of the next crpyto packet is aligned with the start of piece data and the crpyto packet is at least as large as the piece data. With a little extra work we could receive directly into a disk buffer in that case.</td></tr><trid="163"style="display: none;"colspan="3"><tdcolspan="3"><h2>Detect when the start of the next crpyto packet is aligned
we could receive directly into a disk buffer in that case.</h2><h4>../include/libtorrent/receive_buffer.hpp:255</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(165)">../include/libtorrent/settings_pack.hpp:1099</a></td><td>deprecate this ``max_rejects`` is the number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.</td></tr><trid="165"style="display: none;"colspan="3"><tdcolspan="3"><h2>deprecate this
and is disconnected.</h2><h4>../include/libtorrent/settings_pack.hpp:1099</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> auto_manage_startup,
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(167)">../include/libtorrent/torrent.hpp:1324</a></td><td>These two bitfields should probably be coalesced into one</td></tr><trid="167"style="display: none;"colspan="3"><tdcolspan="3"><h2>These two bitfields should probably be coalesced into one</h2><h4>../include/libtorrent/torrent.hpp:1324</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // the .torrent file from m_url
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(168)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><trid="168"style="display: none;"colspan="3"><tdcolspan="3"><h2>include the number of peers received from this tracker, at last
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(169)">../include/libtorrent/torrent_info.hpp:270</a></td><td>there may be some opportunities to optimize the size if torrent_info. specifically to turn some std::string and std::vector into pointers</td></tr><trid="169"style="display: none;"colspan="3"><tdcolspan="3"><h2>there may be some opportunities to optimize the size if torrent_info.
specifically to turn some std::string and std::vector into pointers</h2><h4>../include/libtorrent/torrent_info.hpp:270</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // The URL of the web seed
std::string url;
// Optional authentication. If this is set, it's passed
// in as HTTP basic auth to the web seed. The format is:
// username:password.
std::string auth;
// Any extra HTTP headers that need to be passed to the web seed
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(170)">../include/libtorrent/tracker_manager.hpp:382</a></td><td>this should be unique_ptr in the future</td></tr><trid="170"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should be unique_ptr in the future</h2><h4>../include/libtorrent/tracker_manager.hpp:382</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // this is only used for SOCKS packets, since
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(171)">../include/libtorrent/upnp.hpp:108</a></td><td>support using the windows API for UPnP operations as well</td></tr><trid="171"style="display: none;"colspan="3"><tdcolspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:108</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> external_port_must_be_wildcard = 727
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(172)">../include/libtorrent/utp_stream.hpp:395</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><trid="172"style="display: none;"colspan="3"><tdcolspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:395</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(173)">../include/libtorrent/kademlia/item.hpp:61</a></td><td>since this is a public function, it should probably be moved out of this header and into one with other public functions.</td></tr><trid="173"style="display: none;"colspan="3"><tdcolspan="3"><h2>since this is a public function, it should probably be moved
out of this header and into one with other public functions.</h2><h4>../include/libtorrent/kademlia/item.hpp:61</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#include <boost/array.hpp>
namespace libtorrent { namespace dht
{
// calculate the target hash for an immutable item.
sha1_hash TORRENT_EXTRA_EXPORT item_target_id(
std::pair<char const*, int> v);
// calculate the target hash for a mutable item.
sha1_hash TORRENT_EXTRA_EXPORT item_target_id(std::pair<char const*, int> salt
, char const* pk);
bool TORRENT_EXTRA_EXPORT verify_mutable_item(
std::pair<char const*, int> v
, std::pair<char const*, int> salt
, boost::uint64_t seq
, char const* pk
, char const* sig);
<divstyle="background: #ffff00"width="100%">
</div>// given a byte range ``v`` and an optional byte range ``salt``, a
// sequence number, public key ``pk`` (must be 32 bytes) and a secret key
// ``sk`` (must be 64 bytes), this function produces a signature which
// is written into a 64 byte buffer pointed to by ``sig``. The caller
// is responsible for allocating the destination buffer that's passed in
// as the ``sig`` argument. Typically it would be allocated on the stack.
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(174)">../include/libtorrent/aux_/session_impl.hpp:836</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><trid="174"style="display: none;"colspan="3"><tdcolspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:836</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // listen socket. For each retry the port number
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(175)">../include/libtorrent/aux_/session_impl.hpp:887</a></td><td>replace this by a proper asio timer</td></tr><trid="175"style="display: none;"colspan="3"><tdcolspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:887</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(176)">../include/libtorrent/aux_/session_impl.hpp:892</a></td><td>replace this by a proper asio timer</td></tr><trid="176"style="display: none;"colspan="3"><tdcolspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:892</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(177)">../include/libtorrent/aux_/session_impl.hpp:899</a></td><td>replace this by a proper asio timer</td></tr><trid="177"style="display: none;"colspan="3"><tdcolspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:899</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(178)">../include/libtorrent/aux_/session_interface.hpp:229</a></td><td>it would be nice to not have this be part of session_interface</td></tr><trid="178"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be nice to not have this be part of session_interface</h2><h4>../include/libtorrent/aux_/session_interface.hpp:229</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(179)">../include/libtorrent/aux_/session_settings.hpp:78</a></td><td>make this a bitfield</td></tr><trid="179"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this a bitfield</h2><h4>../include/libtorrent/aux_/session_settings.hpp:78</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if ((name & settings_pack::type_mask) != settings_pack:: type ## _type_base) return default_val; \