<tablewidth="100%"border="1"style="border-collapse: collapse;"><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(0)">src/alert.cpp:370</a></td><td>change this to use a timed wait on a condition variable problem is, that's not necessarily portable. But it should be used where available. This implementation can be left the way it is for more primitive platforms</td></tr><trid="0"style="display: none;"colspan="3"><tdcolspan="3"><h2>change this to use a timed wait on a condition variable
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(3)">src/torrent.cpp:1505</a></td><td>filter out peers that are disconnecting</td></tr><trid="3"style="display: none;"colspan="3"><tdcolspan="3"><h2>filter out peers that are disconnecting</h2><h4>src/torrent.cpp:1505</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> snprintf(filename, sizeof(filename), "/tmp/%d.pem", rand());
FILE* f = fopen(filename, "w+");
fwrite(cert.c_str(), cert.size(), 1, f);
fclose(f);
ctx->load_verify_file(filename);
#endif
// if all went well, set the torrent ssl context to this one
m_ssl_ctx = ctx;
// tell the client we need a cert for this torrent
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(4)">src/torrent.cpp:6004</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><trid="4"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:6004</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> return false;
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(5)">src/torrent.cpp:8718</a></td><td>with 110 as response codes, we should just consider the tracker as a failure and not retry it anymore</td></tr><trid="5"style="display: none;"colspan="3"><tdcolspan="3"><h2>with 110 as response codes, we should just consider
the tracker as a failure and not retry
it anymore</h2><h4>src/torrent.cpp:8718</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_ses.is_network_thread());
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(6)">src/utp_stream.cpp:412</a></td><td>remove the read timeout concept. This should not be necessary</td></tr><trid="6"style="display: none;"colspan="3"><tdcolspan="3"><h2>remove the read timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:412</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // these are the callbacks made into the utp_stream object
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(7)">src/utp_stream.cpp:415</a></td><td>remove the write timeout concept. This should not be necessary</td></tr><trid="7"style="display: none;"colspan="3"><tdcolspan="3"><h2>remove the write timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:415</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // these are the callbacks made into the utp_stream object
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(8)">src/kademlia/rpc_manager.cpp:36</a></td><td>remove this dependency by having the dht observer have its own flags</td></tr><trid="8"style="display: none;"colspan="3"><tdcolspan="3"><h2>remove this dependency by having the dht observer
have its own flags</h2><h4>src/kademlia/rpc_manager.cpp:36</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(9)">include/libtorrent/kademlia/dht_tracker.hpp:79</a></td><td>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</td></tr><trid="9"style="display: none;"colspan="3"><tdcolspan="3"><h2>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</h2><h4>include/libtorrent/kademlia/dht_tracker.hpp:79</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> struct lazy_entry;
</pre></td></tr><trstyle="background: #fcc"><td>relevance 3</td><td><ahref="javascript:expand(10)">include/libtorrent/kademlia/find_data.hpp:60</a></td><td>rename this class to find_peers, since that's what it does find_data is an unnecessarily generic name</td></tr><trid="10"style="display: none;"colspan="3"><tdcolspan="3"><h2>rename this class to find_peers, since that's what it does
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(11)">src/session_impl.cpp:5113</a></td><td>if we still can't find the torrent, we should probably look for it by url here</td></tr><trid="11"style="display: none;"colspan="3"><tdcolspan="3"><h2>if we still can't find the torrent, we should probably look for it by url here</h2><h4>src/session_impl.cpp:5113</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
}
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
else
{
session_log("metadata info-hash failed");
}
#endif
}
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(12)">src/torrent.cpp:5789</a></td><td>pass in ec along with the alert</td></tr><trid="12"style="display: none;"colspan="3"><tdcolspan="3"><h2>pass in ec along with the alert</h2><h4>src/torrent.cpp:5789</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(13)">src/utp_stream.cpp:617</a></td><td>support the option to turn it off</td></tr><trid="13"style="display: none;"colspan="3"><tdcolspan="3"><h2>support the option to turn it off</h2><h4>src/utp_stream.cpp:617</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> UTP_STATE_ERROR_WAIT,
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(14)">src/utp_stream.cpp:1846</a></td><td>we might want to do something else here as well, to resend the packet immediately without it being an MTU probe</td></tr><trid="14"style="display: none;"colspan="3"><tdcolspan="3"><h2>we might want to do something else here
as well, to resend the packet immediately without
it being an MTU probe</h2><h4>src/utp_stream.cpp:1846</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , boost::uint32_t(h->timestamp_difference_microseconds), int(p->mtu_probe)
// if we have payload, we need to save the packet until it's acked
// and progress m_seq_nr
if (p->size > p->header_size)
{
// if we're sending a payload packet, there should not
// be a nagle packet waiting for more data
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(15)">src/kademlia/dht_tracker.cpp:641</a></td><td>fix this stats logging. For instance, the stats counters could be factored out into its own class, and dht_tracker could take an optional reference to it ++m_replies_sent[e["r"]]; m_replies_bytes_sent[e["r"]] += int(m_send_buf.size());</td></tr><trid="15"style="display: none;"colspan="3"><tdcolspan="3"><h2>fix this stats logging. For instance,
the stats counters could be factored out into its own
class, and dht_tracker could take an optional reference to it
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(16)">src/kademlia/node.cpp:63</a></td><td>make this configurable in dht_settings</td></tr><trid="16"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this configurable in dht_settings</h2><h4>src/kademlia/node.cpp:63</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/alert.hpp"
#include "libtorrent/socket.hpp"
#include "libtorrent/random.hpp"
#include "libtorrent/aux_/session_impl.hpp"
#include "libtorrent/kademlia/node_id.hpp"
#include "libtorrent/kademlia/rpc_manager.hpp"
#include "libtorrent/kademlia/routing_table.hpp"
#include "libtorrent/kademlia/node.hpp"
#include "libtorrent/kademlia/refresh.hpp"
#include "libtorrent/kademlia/find_data.hpp"
#include "libtorrent/rsa.hpp"
namespace libtorrent { namespace dht
{
void incoming_error(entry& e, char const* msg);
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(17)">include/libtorrent/torrent.hpp:1038</a></td><td>this should be a deque, since time critical pieces are expected to be popped in the same order as they are sorted. The expectation is that new items are pushed back and items are popped from the front</td></tr><trid="17"style="display: none;"colspan="3"><tdcolspan="3"><h2>this should be a deque, since time critical
pieces are expected to be popped in the same order
as they are sorted. The expectation is that new items
are pushed back and items are popped from the front</h2><h4>include/libtorrent/torrent.hpp:1038</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(18)">include/libtorrent/torrent_info.hpp:450</a></td><td>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</td></tr><trid="18"style="display: none;"colspan="3"><tdcolspan="3"><h2>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</h2><h4>include/libtorrent/torrent_info.hpp:450</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> std::vector<announce_entry> m_urls;
std::vector<web_seed_entry> m_web_seeds;
nodes_t m_nodes;
// if this is a merkle torrent, this is the merkle
// tree. It has space for merkle_num_nodes(merkle_num_leafs(num_pieces))
// hashes
std::vector<sha1_hash> m_merkle_tree;
// this is a copy of the info section from the torrent.
// it use maintained in this flat format in order to
// make it available through the metadata extension
boost::shared_array<char> m_info_section;
// this is a pointer into the m_info_section buffer
// pointing to the first byte of the first sha-1 hash
// the info section parsed. points into m_info_section
// parsed lazily
mutable lazy_entry m_info_dict;
// if a creation date is found in the torrent file
// this will be set to that, otherwise it'll be
// 1970, Jan 1
time_t m_creation_date;
// the hash that identifies this torrent
sha1_hash m_info_hash;
// the number of bytes in m_info_section
boost::uint32_t m_info_section_size:24;
// this is used when creating a torrent. If there's
// only one file there are cases where it's impossible
// to know if it should be written as a multifile torrent
</pre></td></tr><trstyle="background: #cfc"><td>relevance 2</td><td><ahref="javascript:expand(19)">include/libtorrent/kademlia/node_entry.hpp:92</a></td><td>replace with a union of address_v4 and address_v6 to not waste space. This struct is instantiated hundreds of times for the routing table</td></tr><trid="19"style="display: none;"colspan="3"><tdcolspan="3"><h2>replace with a union of address_v4 and address_v6
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(20)">src/http_seed_connection.cpp:120</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="20"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:120</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(21)">src/peer_connection.cpp:2488</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><trid="21"style="display: none;"colspan="3"><tdcolspan="3"><h2>peers should really be corked/uncorked outside of
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(22)">src/session_impl.cpp:5471</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="22"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:5471</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(24)">src/session_impl.cpp:6138</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="24"style="display: none;"colspan="3"><tdcolspan="3"><h2>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</h2><h4>src/session_impl.cpp:6138</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::set_external_address(address const& ip
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(25)">src/torrent.cpp:1112</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="25"style="display: none;"colspan="3"><tdcolspan="3"><h2>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</h2><h4>src/torrent.cpp:1112</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
return;
}
// notify the user of the error
if (alerts().should_post<file_error_alert>())
int size = m_torrent_file->piece_size(r.piece);
if (rp->fail)
{
rp->piece_data.reset();
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(26)">src/torrent.cpp:5292</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><trid="26"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:5292</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(27)">src/torrent.cpp:5930</a></td><td>ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.</td></tr><trid="27"style="display: none;"colspan="3"><tdcolspan="3"><h2>ideally, we would disconnect the oldest connection
i.e. the one that has waited the longest to connect.</h2><h4>src/torrent.cpp:5930</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_ses.is_aborted())
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(28)">src/torrent.cpp:6179</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="28"style="display: none;"colspan="3"><tdcolspan="3"><h2>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</h2><h4>src/torrent.cpp:6179</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
// this torrent just completed downloads, which means it will fall
// under a different limit with the auto-manager. Make sure we
// update auto-manage torrents in that case
if (m_auto_managed)
m_ses.trigger_auto_manage();
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(29)">src/torrent_info.cpp:187</a></td><td>we might save constructing a std::String if this would take a char const* instead</td></tr><trid="29"style="display: none;"colspan="3"><tdcolspan="3"><h2>we might save constructing a std::String if this would take a char const* instead</h2><h4>src/torrent_info.cpp:187</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(30)">src/torrent_info.cpp:366</a></td><td>this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!</td></tr><trid="30"style="display: none;"colspan="3"><tdcolspan="3"><h2>this logic should be a separate step
done once the torrent is loaded, and the original
filenames should be preserved!</h2><h4>src/torrent_info.cpp:366</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
// This is a memory optimization! Instead of having
// each entry keep a string for its filename, make it
// simply point into the info-section buffer
internal_file_entry const& fe = *target.rbegin();
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(31)">src/torrent_info.cpp:387</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><trid="31"style="display: none;"colspan="3"><tdcolspan="3"><h2>once the filename renaming is removed from here
this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(32)">src/kademlia/node.cpp:690</a></td><td>find_node should write directly to the response entry</td></tr><trid="32"style="display: none;"colspan="3"><tdcolspan="3"><h2>find_node should write directly to the response entry</h2><h4>src/kademlia/node.cpp:690</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
if (!verify_message(arg_ent, msg_desc, msg_keys, 5, error_string, sizeof(error_string)))
{
#ifdef TORRENT_DHT_VERBOSE_LOGGING
++g_failed_announces;
#endif
incoming_error(e, error_string);
return;
}
int port = int(msg_keys[1]->int_value());
if (port < 0 || port >= 65536)
{
#ifdef TORRENT_DHT_VERBOSE_LOGGING
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(33)">include/libtorrent/ip_voter.hpp:100</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="33"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:100</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> bloom_filter<32> m_external_address_voters;
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(34)">include/libtorrent/utp_stream.hpp:350</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><trid="34"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:350</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
</pre></td></tr><trstyle="background: #ccf"><td>relevance 1</td><td><ahref="javascript:expand(35)">include/libtorrent/web_peer_connection.hpp:127</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="35"style="display: none;"colspan="3"><tdcolspan="3"><h2>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</h2><h4>include/libtorrent/web_peer_connection.hpp:127</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(36)">src/bt_peer_connection.cpp:660</a></td><td>this could be optimized using knuth morris pratt</td></tr><trid="36"style="display: none;"colspan="3"><tdcolspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>src/bt_peer_connection.cpp:660</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_encrypted && m_rc4_encrypted)
int bt_peer_connection::get_syncoffset(char const* src, int src_size,
char const* target, int target_size) const
{
TORRENT_ASSERT(target_size >= src_size);
TORRENT_ASSERT(src_size > 0);
TORRENT_ASSERT(src);
TORRENT_ASSERT(target);
int traverse_limit = target_size - src_size;
<divstyle="background: #ffff00"width="100%"> for (int i = 0; i < traverse_limit; ++i)
</div> {
char const* target_ptr = target + i;
if (std::equal(src, src+src_size, target_ptr))
return i;
}
// // Partial sync
// for (int i = 0; i < target_size; ++i)
// {
// // first is iterator in src[] at which mismatch occurs
// // second is iterator in target[] at which mismatch occurs
// std::pair<const char*, const char*> ret;
// int src_sync_size;
// if (i > traverse_limit) // partial sync test
// {
// ret = std::mismatch(src, src + src_size - (i - traverse_limit), &target[i]);
// src_sync_size = ret.first - src;
// if (src_sync_size == (src_size - (i - traverse_limit)))
// return i;
// }
// else // complete sync test
// {
// ret = std::mismatch(src, src + src_size, &target[i]);
// src_sync_size = ret.first - src;
// if (src_sync_size == src_size)
// return i;
// }
// }
// no complete sync
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(37)">src/bt_peer_connection.cpp:1755</a></td><td>don't trust this blindly</td></tr><trid="37"style="display: none;"colspan="3"><tdcolspan="3"><h2>don't trust this blindly</h2><h4>src/bt_peer_connection.cpp:1755</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // but where do we put that info?
int last_seen_complete = boost::uint8_t(root.dict_find_int_value("complete_ago", -1));
if (last_seen_complete >= 0) set_last_seen_complete(last_seen_complete);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(39)">src/bt_peer_connection.cpp:3308</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><trid="39"style="display: none;"colspan="3"><tdcolspan="3"><h2>move the erasing into the loop above
remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:3308</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(40)">src/file.cpp:1205</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><trid="40"style="display: none;"colspan="3"><tdcolspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>src/file.cpp:1205</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(41)">src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><trid="41"style="display: none;"colspan="3"><tdcolspan="3"><h2>support authentication (i.e. user name and password) in the URL</h2><h4>src/http_tracker_connection.cpp:99</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> , aux::session_impl const& ses
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(42)">src/i2p_stream.cpp:172</a></td><td>move this to proxy_base and use it in all proxies</td></tr><trid="42"style="display: none;"colspan="3"><tdcolspan="3"><h2>move this to proxy_base and use it in all proxies</h2><h4>src/i2p_stream.cpp:172</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(43)">src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><trid="43"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(44)">src/peer_connection.cpp:2651</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><trid="44"style="display: none;"colspan="3"><tdcolspan="3"><h2>this might need something more
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(45)">src/peer_connection.cpp:2782</a></td><td>sort the allowed fast set in priority order</td></tr><trid="45"style="display: none;"colspan="3"><tdcolspan="3"><h2>sort the allowed fast set in priority order</h2><h4>src/peer_connection.cpp:2782</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // this piece index later
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(46)">src/peer_connection.cpp:3892</a></td><td>we should probably just send a HAVE_ALL here</td></tr><trid="46"style="display: none;"colspan="3"><tdcolspan="3"><h2>we should probably just send a HAVE_ALL here</h2><h4>src/peer_connection.cpp:3892</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> std::fill(m_recv_buffer.begin() + m_recv_pos, m_recv_buffer.end(), 0);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(47)">src/peer_connection.cpp:4475</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><trid="47"style="display: none;"colspan="3"><tdcolspan="3"><h2>peers should really be corked/uncorked outside of
all completed disk operations</h2><h4>src/peer_connection.cpp:4475</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> // this means we're in seed mode and we haven't yet
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(48)">src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><trid="48"style="display: none;"colspan="3"><tdcolspan="3"><h2>only allow _one_ connection to use this
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(49)">src/policy.cpp:1889</a></td><td>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</td></tr><trid="49"style="display: none;"colspan="3"><tdcolspan="3"><h2>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</h2><h4>src/policy.cpp:1889</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(50)">src/session_impl.cpp:1887</a></td><td>recalculate all connect candidates for all torrents</td></tr><trid="50"style="display: none;"colspan="3"><tdcolspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>src/session_impl.cpp:1887</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(51)">src/session_impl.cpp:4267</a></td><td>allow extensions to sort torrents for queuing</td></tr><trid="51"style="display: none;"colspan="3"><tdcolspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>src/session_impl.cpp:4267</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t->is_paused())
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(52)">src/session_impl.cpp:4423</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="52"style="display: none;"colspan="3"><tdcolspan="3"><h2>use a lower limit than m_settings.connections_limit
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(53)">src/session_impl.cpp:4457</a></td><td>make this bias configurable</td></tr><trid="53"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this bias configurable</h2><h4>src/session_impl.cpp:4457</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(54)">src/session_impl.cpp:4458</a></td><td>also take average_peers into account, to create a bias for downloading torrents with <averagepeers</td></tr><trid="54"style="display: none;"colspan="3"><tdcolspan="3"><h2>also take average_peers into account, to create a bias for downloading torrents with <averagepeers</h2><h4>src/session_impl.cpp:4458</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> {
int upload_limit = m_bandwidth_channel[peer_connection::upload_channel]->throttle();
if (m_settings.choking_algorithm == session_settings::auto_expand_choker
&& upload_limit > 0)
{
// if our current upload rate is less than 90% of our
// limit AND most torrents are not "congested", i.e.
// they are not holding back because of a per-torrent
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(57)">src/storage.cpp:325</a></td><td>if the read fails, set error and exit immediately</td></tr><trid="57"style="display: none;"colspan="3"><tdcolspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>src/storage.cpp:325</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> int block_size = 16 * 1024;
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(58)">src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><trid="58"style="display: none;"colspan="3"><tdcolspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>src/storage.cpp:358</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_storage->disk_pool()) block_size = m_storage->disk_pool()->block_size();
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(59)">src/storage.cpp:623</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="59"style="display: none;"colspan="3"><tdcolspan="3"><h2>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</h2><h4>src/storage.cpp:623</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> for (file_iter = files().begin();;)
for (int i = 0; i < file_sizes_ent->list_size(); ++i)
{
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(60)">src/storage.cpp:1208</a></td><td>what if file_base is used to merge several virtual files into a single physical file? We should probably disable this if file_base is used. This is not a widely used feature though</td></tr><trid="60"style="display: none;"colspan="3"><tdcolspan="3"><h2>what if file_base is used to merge several virtual files
into a single physical file? We should probably disable this
if file_base is used. This is not a widely used feature though</h2><h4>src/storage.cpp:1208</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> int bytes_transferred = 0;
// if the file is opened in no_buffer mode, and the
// read is unaligned, we need to fall back on a slow
// special read that reads aligned buffers and copies
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(61)">src/torrent.cpp:5025</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="61"style="display: none;"colspan="3"><tdcolspan="3"><h2>make this more generic to not just work if files have been
which are kept in sync</h2><h4>src/torrent.cpp:5025</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(62)">src/torrent.cpp:5161</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="62"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(63)">src/torrent.cpp:5349</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="63"style="display: none;"colspan="3"><tdcolspan="3"><h2>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.
int max_failcount = (std::min)(settings().max_failcount, 31);
int num_saved_peers = 0;
for (policy::const_iterator i = m_policy.begin_peer()
, end(m_policy.end_peer()); i != end; ++i)
{
error_code ec;
policy::peer const* p = *i;
address addr = p->address();
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(64)">src/torrent.cpp:7820</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><trid="64"style="display: none;"colspan="3"><tdcolspan="3"><h2>go through the pieces we have and count the total number
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(65)">src/torrent.cpp:8047</a></td><td>if there's been long enough since we requested something from this piece, request one of the backup blocks (the one with the least number of requests to it) and update the last request timestamp</td></tr><trid="65"style="display: none;"colspan="3"><tdcolspan="3"><h2>if there's been long enough since we requested something
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(66)">src/udp_tracker_connection.cpp:548</a></td><td>it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers</td></tr><trid="66"style="display: none;"colspan="3"><tdcolspan="3"><h2>it would be more efficient to not use a string here.
however, the problem is that some trackers will respond
with actual strings. For example i2p trackers</h2><h4>src/udp_tracker_connection.cpp:548</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;"> }
bool udp_tracker_connection::on_scrape_response(char const* buf, int size)
{
restart_read_timeout();
int action = detail::read_int32(buf);
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(67)">include/libtorrent/config.hpp:283</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><trid="67"style="display: none;"colspan="3"><tdcolspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>include/libtorrent/config.hpp:283</h4><prestyle="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><trstyle="background: #ccc"><td>relevance 0</td><td><ahref="javascript:expand(68)">include/libtorrent/proxy_base.hpp:152</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="68"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