|
|
|
@ -74,7 +74,7 @@ does not support hard links.</h2><h4>../src/file.cpp:487</h4><pre style="backgro
|
|
|
|
|
|
|
|
|
|
// most errors are passed through, except for the ones that indicate that
|
|
|
|
|
// hard links are not supported and require a copy.
|
|
|
|
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:2028</a></td><td>port map SSL udp socket here</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>port map SSL udp socket here</h2><h4>../src/session_impl.cpp:2028</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> udp::endpoint ssl_bind_if(m_listen_interface.address(), ssl_port);
|
|
|
|
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:2030</a></td><td>port map SSL udp socket here</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>port map SSL udp socket here</h2><h4>../src/session_impl.cpp:2030</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> udp::endpoint ssl_bind_if(m_listen_interface.address(), ssl_port);
|
|
|
|
|
|
|
|
|
|
// if ssl port is 0, we don't want to listen on an SSL port
|
|
|
|
|
if (ssl_port != 0)
|
|
|
|
@ -1483,7 +1483,9 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
|
|
|
|
|
{
|
|
|
|
|
error_code err;
|
|
|
|
|
address test_family = address::from_string(device.c_str(), err);
|
|
|
|
|
if (!err && test_family.is_v4() != address_family)
|
|
|
|
|
if (!err
|
|
|
|
|
&& test_family.is_v4() != address_family
|
|
|
|
|
&& !is_any(test_family))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
listen_socket_t s = setup_listener(device, address_family, port
|
|
|
|
@ -1496,9 +1498,7 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!ec && s.sock)
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(!m_abort);
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(30)">../src/session_impl.cpp:2012</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2012</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(30)">../src/session_impl.cpp:2014</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2014</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
if (listen_port_retries > 0)
|
|
|
|
|
{
|
|
|
|
|
m_listen_interface.port(m_listen_interface.port() + 1);
|
|
|
|
@ -1533,7 +1533,7 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
|
|
|
|
|
}
|
|
|
|
|
ec.clear();
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:2032</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2032</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ssl_port != 0)
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:2034</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2034</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ssl_port != 0)
|
|
|
|
|
{
|
|
|
|
|
m_ssl_udp_socket.bind(ssl_bind_if, ec);
|
|
|
|
|
if (ec)
|
|
|
|
@ -1584,8 +1584,8 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
|
|
|
|
|
|
|
|
|
|
// we made it! now post all the listen_succeeded_alerts
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(32)">../src/session_impl.cpp:3511</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><tr id="32" style="display: none;" colspan="3"><td colspan="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:3511</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(32)">../src/session_impl.cpp:3513</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><tr id="32" style="display: none;" colspan="3"><td colspan="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:3513</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
|
|
|
|
|
{
|
|
|
|
|
boost::shared_ptr<torrent> t;
|
|
|
|
|
do
|
|
|
|
@ -1636,9 +1636,9 @@ don't have to loop over all torrents, just to find the ones that want to announc
|
|
|
|
|
if (m_torrents.empty()) return;
|
|
|
|
|
|
|
|
|
|
if (m_next_lsd_torrent == m_torrents.end())
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(33)">../src/storage.cpp:941</a></td><td>is this risky? The upper layer will assume we have the whole file. Perhaps we should verify that at least the size of the file is correct</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>is this risky? The upper layer will assume we have the
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(33)">../src/storage.cpp:948</a></td><td>is this risky? The upper layer will assume we have the whole file. Perhaps we should verify that at least the size of the file is correct</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>is this risky? The upper layer will assume we have the
|
|
|
|
|
whole file. Perhaps we should verify that at least the size
|
|
|
|
|
of the file is correct</h2><h4>../src/storage.cpp:941</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (links)
|
|
|
|
|
of the file is correct</h2><h4>../src/storage.cpp:948</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (links)
|
|
|
|
|
{
|
|
|
|
|
// if this is a mutable torrent, and we need to pick up some files
|
|
|
|
|
// from other torrents, do that now. Note that there is an inherent
|
|
|
|
@ -1844,8 +1844,8 @@ first IP in this list and leave a comment here</h2><h4>../src/torrent.cpp:3366</
|
|
|
|
|
|
|
|
|
|
if ((!resp.trackerid.empty()) && (ae->trackerid != resp.trackerid))
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(37)">../src/torrent.cpp:4885</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
|
|
|
|
|
session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(37)">../src/torrent.cpp:4890</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
|
|
|
|
|
session host resolver interface</h2><h4>../src/torrent.cpp:4890</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
|
|
|
|
|
disconnect_all(errors::torrent_aborted, op_bittorrent);
|
|
|
|
|
|
|
|
|
|
// post a message to the main thread to destruct
|
|
|
|
@ -1896,7 +1896,7 @@ session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="
|
|
|
|
|
// disable super seeding for all peers
|
|
|
|
|
for (peer_iterator i = begin(); i != end(); ++i)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(38)">../src/torrent.cpp:5031</a></td><td>the tracker login feature should probably be deprecated</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>the tracker login feature should probably be deprecated</h2><h4>../src/torrent.cpp:5031</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> alerts().emplace_alert<file_renamed_alert>(get_handle()
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(38)">../src/torrent.cpp:5036</a></td><td>the tracker login feature should probably be deprecated</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>the tracker login feature should probably be deprecated</h2><h4>../src/torrent.cpp:5036</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> alerts().emplace_alert<file_renamed_alert>(get_handle()
|
|
|
|
|
, j->buffer.string, j->piece);
|
|
|
|
|
m_torrent_file->rename_file(j->piece, j->buffer.string);
|
|
|
|
|
}
|
|
|
|
@ -1947,9 +1947,9 @@ session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="
|
|
|
|
|
for (std::vector<peer_connection*>::iterator i
|
|
|
|
|
= m_connections.begin(), end(m_connections.end()); i != end; ++i)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(39)">../src/torrent.cpp:8018</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it perhaps this logic should be disabled if we have too many idle peers (with some definition of idle)</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(39)">../src/torrent.cpp:8023</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it perhaps this logic should be disabled if we have too many idle peers (with some definition of idle)</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it
|
|
|
|
|
perhaps this logic should be disabled if we have too many idle peers
|
|
|
|
|
(with some definition of idle)</h2><h4>../src/torrent.cpp:8018</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#ifndef TORRENT_DISABLE_LOGGING
|
|
|
|
|
(with some definition of idle)</h2><h4>../src/torrent.cpp:8023</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#ifndef TORRENT_DISABLE_LOGGING
|
|
|
|
|
debug_log("incoming peer (%d)", int(m_connections.size()));
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -2418,7 +2418,7 @@ peer_connection</h2><h4>../src/web_peer_connection.cpp:689</h4><pre style="backg
|
|
|
|
|
#endif
|
|
|
|
|
t->add_web_seed(location, web_seed_entry::url_seed, m_external_auth, m_extra_headers);
|
|
|
|
|
t->remove_web_seed(this, errors::redirecting, op_bittorrent, 2);
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(48)">../src/kademlia/dht_storage.cpp:106</a></td><td>make this configurable in dht_settings</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/dht_storage.cpp:106</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this is a group. It contains a set of group members
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(48)">../src/kademlia/dht_storage.cpp:110</a></td><td>make this configurable in dht_settings</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/dht_storage.cpp:110</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this is a group. It contains a set of group members
|
|
|
|
|
struct torrent_entry
|
|
|
|
|
{
|
|
|
|
|
std::string name;
|
|
|
|
@ -2725,14 +2725,14 @@ boost::tuple<int, int, int> routing_table::size() const
|
|
|
|
|
else
|
|
|
|
|
new_replacement_bucket.push_back(*j);
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(54)">../include/libtorrent/alert_types.hpp:1427</a></td><td>should the alert baseclass have this object instead?</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>should the alert baseclass have this object instead?</h2><h4>../include/libtorrent/alert_types.hpp:1427</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(54)">../include/libtorrent/alert_types.hpp:1429</a></td><td>should the alert baseclass have this object instead?</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>should the alert baseclass have this object instead?</h2><h4>../include/libtorrent/alert_types.hpp:1429</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
// internal
|
|
|
|
|
portmap_log_alert(aux::stack_allocator& alloc, int t, const char* m);
|
|
|
|
|
|
|
|
|
|
TORRENT_DEFINE_ALERT(portmap_log_alert, 52)
|
|
|
|
|
|
|
|
|
|
static const int static_category = alert::port_mapping_log_notification;
|
|
|
|
|
virtual std::string message() const;
|
|
|
|
|
virtual std::string message() const TORRENT_OVERRIDE;
|
|
|
|
|
|
|
|
|
|
int map_type;
|
|
|
|
|
|
|
|
|
@ -2766,7 +2766,7 @@ boost::tuple<int, int, int> routing_table::size() const
|
|
|
|
|
|
|
|
|
|
static const int static_category = alert::status_notification
|
|
|
|
|
| alert::error_notification;
|
|
|
|
|
virtual std::string message() const;
|
|
|
|
|
virtual std::string message() const TORRENT_OVERRIDE;
|
|
|
|
|
|
|
|
|
|
error_code error;
|
|
|
|
|
|
|
|
|
@ -2819,11 +2819,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(56)">../include/libtorrent/enum_net.hpp:143</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><tr id="56" style="display: none;" colspan="3"><td colspan="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:143</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
address ip = address::from_string(device_name, ec);
|
|
|
|
|
if (!ec)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(56)">../include/libtorrent/enum_net.hpp:150</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><tr id="56" style="display: none;" colspan="3"><td colspan="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:150</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // providing 0.0.0.0 as the device, turn it into "::0"
|
|
|
|
|
if (ip == address_v4::any() && !ipv4)
|
|
|
|
|
ip = address_v6::any();
|
|
|
|
|
#endif
|
|
|
|
|
bind_ep.address(ip);
|
|
|
|
|
// it appears to be an IP. Just bind to that address
|
|
|
|
|
sock.bind(bind_ep, ec);
|
|
|
|
@ -3205,8 +3205,8 @@ protected:
|
|
|
|
|
|
|
|
|
|
boost::shared_ptr<tracker_connection> shared_from_this()
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(64)">../include/libtorrent/aux_/session_impl.hpp:1146</a></td><td>the throttling of saving resume data could probably be factored out into a separate class</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>the throttling of saving resume data could probably be
|
|
|
|
|
factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_impl.hpp:1146</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // each second tick the timer takes a little
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(64)">../include/libtorrent/aux_/session_impl.hpp:1147</a></td><td>the throttling of saving resume data could probably be factored out into a separate class</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>the throttling of saving resume data could probably be
|
|
|
|
|
factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_impl.hpp:1147</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // each second tick the timer takes a little
|
|
|
|
|
// bit longer than one second to trigger. The
|
|
|
|
|
// extra time it took is accumulated into this
|
|
|
|
|
// counter. Every time it exceeds 1000, torrents
|
|
|
|
@ -3217,8 +3217,8 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
|
|
|
|
|
boost::uint16_t m_tick_residual;
|
|
|
|
|
|
|
|
|
|
#ifndef TORRENT_DISABLE_LOGGING
|
|
|
|
|
virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3);
|
|
|
|
|
virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_FORMAT(2,0);
|
|
|
|
|
virtual void session_log(char const* fmt, ...) const TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(2,3);
|
|
|
|
|
virtual void session_vlog(char const* fmt, va_list& va) const TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(2,0);
|
|
|
|
|
|
|
|
|
|
// this list of tracker loggers serves as tracker_callbacks when
|
|
|
|
|
// shutting down. This list is just here to keep them alive during
|
|
|
|
@ -3226,8 +3226,8 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
|
|
|
|
|
std::list<boost::shared_ptr<tracker_logger> > m_tracker_loggers;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
<div style="background: #ffff00" width="100%"> void queue_async_resume_data(boost::shared_ptr<torrent> const& t);
|
|
|
|
|
</div> void done_async_resume();
|
|
|
|
|
<div style="background: #ffff00" width="100%"> virtual void queue_async_resume_data(boost::shared_ptr<torrent> const& t) TORRENT_OVERRIDE TORRENT_FINAL;
|
|
|
|
|
</div> virtual void done_async_resume() TORRENT_OVERRIDE TORRENT_FINAL;
|
|
|
|
|
void async_resume_dispatched();
|
|
|
|
|
|
|
|
|
|
// state for keeping track of external IPs
|
|
|
|
@ -3242,7 +3242,7 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
|
|
|
|
|
// *glares at gcc*
|
|
|
|
|
struct extention_dht_query
|
|
|
|
|
{
|
|
|
|
|
uint8_t query_len;
|
|
|
|
|
boost::uint8_t query_len;
|
|
|
|
|
boost::array<char, max_dht_query_length> query;
|
|
|
|
|
dht_extension_handler_t handler;
|
|
|
|
|
};
|
|
|
|
@ -3498,8 +3498,8 @@ the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../s
|
|
|
|
|
std::string request;
|
|
|
|
|
request.reserve(400);
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(70)">../src/session_impl.cpp:5306</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><tr id="70" style="display: none;" colspan="3"><td colspan="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:5306</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(70)">../src/session_impl.cpp:5308</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><tr id="70" style="display: none;" colspan="3"><td colspan="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:5308</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
|
|
|
|
, error_code const& ec, int map_transport)
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(is_single_thread());
|
|
|
|
@ -3550,9 +3550,9 @@ this understanding of our external address, instead of the empty address</h2><h4
|
|
|
|
|
session_status session_impl::status() const
|
|
|
|
|
{
|
|
|
|
|
// INVARIANT_CHECK;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:6700</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><tr id="71" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:6702</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><tr id="71" style="display: none;" colspan="3"><td colspan="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:6700</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6702</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
|
|
|
|
|
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
|
|
|
|
|
|
|
|
|
@ -3658,8 +3658,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1235</h4
|
|
|
|
|
if (p->is_interesting()) continue;
|
|
|
|
|
p->update_interest();
|
|
|
|
|
if (!m_abort)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(73)">../src/torrent.cpp:7139</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="73" style="display: none;" colspan="3"><td colspan="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:7139</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k < bits; ++k)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(73)">../src/torrent.cpp:7144</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="73" style="display: none;" colspan="3"><td colspan="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:7144</h4><pre style="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)
|
|
|
|
|
? (1 << k) : 0;
|
|
|
|
|
bitmask.append(1, v);
|
|
|
|
@ -3710,9 +3710,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:7139</h4
|
|
|
|
|
|
|
|
|
|
// write have bitmask
|
|
|
|
|
// the pieces string has one byte per piece. Each
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(74)">../src/torrent.cpp:8362</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><tr id="74" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(74)">../src/torrent.cpp:8367</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><tr id="74" style="display: none;" colspan="3"><td colspan="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:8362</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
for all peers though</h2><h4>../src/torrent.cpp:8367</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
set_state(torrent_status::finished);
|
|
|
|
|
set_queue_position(-1);
|
|
|
|
|
|
|
|
|
@ -4215,7 +4215,7 @@ TORRENT_TEST(duplicates)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div style="background: #ffff00" width="100%">
|
|
|
|
|
</div></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(112)">../test/test_ssl.cpp:385</a></td><td>test using a signed certificate with the wrong info-hash in DN</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>test using a signed certificate with the wrong info-hash in DN</h2><h4>../test/test_ssl.cpp:385</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // in verifying peers
|
|
|
|
|
</div></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(112)">../test/test_ssl.cpp:391</a></td><td>test using a signed certificate with the wrong info-hash in DN</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>test using a signed certificate with the wrong info-hash in DN</h2><h4>../test/test_ssl.cpp:391</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // in verifying peers
|
|
|
|
|
ctx.set_verify_mode(context::verify_none, ec);
|
|
|
|
|
if (ec)
|
|
|
|
|
{
|
|
|
|
@ -4266,8 +4266,8 @@ TORRENT_TEST(duplicates)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
fprintf(stderr, "use_tmp_dh_file \"%s\"\n", dh_params.c_str());
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(113)">../test/test_ssl.cpp:483</a></td><td>also test using a hash that refers to a valid torrent but that differs from the SNI hash</td></tr><tr id="113" style="display: none;" colspan="3"><td colspan="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:483</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &on_alert);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(113)">../test/test_ssl.cpp:489</a></td><td>also test using a hash that refers to a valid torrent but that differs from the SNI hash</td></tr><tr id="113" style="display: none;" colspan="3"><td colspan="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:489</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &on_alert);
|
|
|
|
|
if (ec)
|
|
|
|
|
{
|
|
|
|
|
fprintf(stderr, "Failed SSL handshake: %s\n"
|
|
|
|
@ -6465,7 +6465,7 @@ retry:
|
|
|
|
|
TORRENT_ASSERT(!m_abort);
|
|
|
|
|
m_listen_sockets.push_back(s);
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(187)">../src/session_impl.cpp:2750</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="187" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2750</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(187)">../src/session_impl.cpp:2752</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="187" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2752</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
#if defined TORRENT_ASIO_DEBUGGING
|
|
|
|
|
complete_async("session_impl::on_socks_accept");
|
|
|
|
|
#endif
|
|
|
|
@ -6516,7 +6516,7 @@ retry:
|
|
|
|
|
TORRENT_ASSERT(p->is_disconnecting());
|
|
|
|
|
|
|
|
|
|
TORRENT_ASSERT(sp.use_count() > 0);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(188)">../src/session_impl.cpp:3099</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="188" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3099</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler < 0)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(188)">../src/session_impl.cpp:3101</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="188" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3101</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler < 0)
|
|
|
|
|
{
|
|
|
|
|
INVARIANT_CHECK;
|
|
|
|
|
m_auto_manage_time_scaler = settings().get_int(settings_pack::auto_manage_interval);
|
|
|
|
@ -6567,7 +6567,7 @@ retry:
|
|
|
|
|
// to not miss the torrent after it
|
|
|
|
|
if (!t.want_tick()) --i;
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(189)">../src/session_impl.cpp:3132</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="189" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3132</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if TORRENT_DEBUG_STREAMING > 0
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(189)">../src/session_impl.cpp:3134</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="189" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3134</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if TORRENT_DEBUG_STREAMING > 0
|
|
|
|
|
printf("\033[2J\033[0;0H");
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -6618,9 +6618,9 @@ retry:
|
|
|
|
|
// scrape paused torrents that are auto managed
|
|
|
|
|
// (unless the session is paused)
|
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(190)">../src/session_impl.cpp:3861</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><tr id="190" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(190)">../src/session_impl.cpp:3863</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><tr id="190" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
|
|
|
|
|
to allocate the to 10% or so of connection slots for incoming
|
|
|
|
|
connections</h2><h4>../src/session_impl.cpp:3861</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
|
|
|
|
|
connections</h2><h4>../src/session_impl.cpp:3863</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
|
|
|
|
|
// peer
|
|
|
|
|
|
|
|
|
|
// boost connections are connections made by torrent connection
|
|
|
|
@ -6671,8 +6671,8 @@ connections</h2><h4>../src/session_impl.cpp:3861</h4><pre style="background: #f6
|
|
|
|
|
m_next_finished_connect_torrent = 0;
|
|
|
|
|
|
|
|
|
|
torrent* t = NULL;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(191)">../src/session_impl.cpp:4011</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="191" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
|
|
|
|
|
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4011</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> continue;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(191)">../src/session_impl.cpp:4013</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="191" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
|
|
|
|
|
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4013</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!p->is_peer_interested()
|
|
|
|
@ -6723,12 +6723,12 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
|
|
|
|
|
, allowed_upload_slots);
|
|
|
|
|
|
|
|
|
|
#ifndef TORRENT_DISABLE_LOGGING
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(192)">../src/session_impl.cpp:4397</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. Perhaps the status_update_alert could even have a fixed array of n entries rather than a vector, to further improve memory locality.</td></tr><tr id="192" style="display: none;" colspan="3"><td colspan="3"><h2>it might be a nice feature here to limit the number of torrents
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(192)">../src/session_impl.cpp:4399</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. Perhaps the status_update_alert could even have a fixed array of n entries rather than a vector, to further improve memory locality.</td></tr><tr id="192" style="display: none;" colspan="3"><td colspan="3"><h2>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. Perhaps the status_update_alert could even have a fixed
|
|
|
|
|
array of n entries rather than a vector, to further improve memory
|
|
|
|
|
locality.</h2><h4>../src/session_impl.cpp:4397</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t->status(&*i, flags);
|
|
|
|
|
locality.</h2><h4>../src/session_impl.cpp:4399</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t->status(&*i, flags);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -6779,8 +6779,8 @@ locality.</h2><h4>../src/session_impl.cpp:4397</h4><pre style="background: #f6f6
|
|
|
|
|
m_dht->update_stats_counters(m_stats_counters);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(193)">../src/session_impl.cpp:4610</a></td><td>this logic could probably be less spaghetti looking by being moved to a function with early exits</td></tr><tr id="193" style="display: none;" colspan="3"><td colspan="3"><h2>this logic could probably be less spaghetti looking by being
|
|
|
|
|
moved to a function with early exits</h2><h4>../src/session_impl.cpp:4610</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(193)">../src/session_impl.cpp:4612</a></td><td>this logic could probably be less spaghetti looking by being moved to a function with early exits</td></tr><tr id="193" style="display: none;" colspan="3"><td colspan="3"><h2>this logic could probably be less spaghetti looking by being
|
|
|
|
|
moved to a function with early exits</h2><h4>../src/session_impl.cpp:4612</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
|
|
|
|
|
|
|
|
|
// figure out the info hash of the torrent
|
|
|
|
|
sha1_hash const* ih = 0;
|
|
|
|
@ -6831,9 +6831,9 @@ moved to a function with early exits</h2><h4>../src/session_impl.cpp:4610</h4><p
|
|
|
|
|
|| !params.url.empty()
|
|
|
|
|
|| params.info_hash.is_all_zeros())
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(194)">../src/storage.cpp:751</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><tr id="194" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(194)">../src/storage.cpp:758</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><tr id="194" style="display: none;" colspan="3"><td colspan="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:751</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (file_offset < files().file_size(file_index))
|
|
|
|
|
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>../src/storage.cpp:758</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (file_offset < files().file_size(file_index))
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
file_offset -= files().file_size(file_index);
|
|
|
|
@ -6884,9 +6884,9 @@ maybe use the same format as .torrent files and reuse some code from torrent_inf
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (file_sizes_ent.list_size() == 0)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(195)">../src/storage.cpp:1082</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><tr id="195" style="display: none;" colspan="3"><td colspan="3"><h2>if everything moves OK, except for the partfile
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(195)">../src/storage.cpp:1089</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><tr id="195" style="display: none;" colspan="3"><td colspan="3"><h2>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</h2><h4>../src/storage.cpp:1082</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ec)
|
|
|
|
|
it would probably make more sense to give up on the partfile</h2><h4>../src/storage.cpp:1089</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ec)
|
|
|
|
|
{
|
|
|
|
|
ec.file = i->second;
|
|
|
|
|
ec.operation = storage_error::copy;
|
|
|
|
@ -7446,7 +7446,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
|
|
|
|
|
debug_log("DHT: no listen sockets");
|
|
|
|
|
|
|
|
|
|
if (m_torrent_file->is_valid() && !m_files_checked)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(206)">../src/torrent.cpp:3723</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="206" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3723</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(206)">../src/torrent.cpp:3728</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="206" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3728</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
|
|
|
|
|
void torrent::on_peer_name_lookup(error_code const& e
|
|
|
|
|
, std::vector<address> const& host_list, int port)
|
|
|
|
@ -7497,7 +7497,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
|
|
|
|
|
boost::int64_t torrent::quantized_bytes_done() const
|
|
|
|
|
{
|
|
|
|
|
// INVARIANT_CHECK;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(207)">../src/torrent.cpp:4663</a></td><td>update suggest_piece?</td></tr><tr id="207" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4663</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (has_picker())
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(207)">../src/torrent.cpp:4668</a></td><td>update suggest_piece?</td></tr><tr id="207" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4668</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (has_picker())
|
|
|
|
|
{
|
|
|
|
|
torrent_peer* pp = peer->peer_info_struct();
|
|
|
|
|
m_picker->inc_refcount_all(pp);
|
|
|
|
@ -7548,8 +7548,8 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
|
|
|
|
|
// availability even when we're a seed, for
|
|
|
|
|
// the suggest piece feature
|
|
|
|
|
if (!has_picker()) return;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(208)">../src/torrent.cpp:4807</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="208" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
|
|
|
|
|
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4807</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(208)">../src/torrent.cpp:4812</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="208" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
|
|
|
|
|
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4812</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
|
|
|
|
|
|
|
|
|
|
// sort in ascending order, to get most recently used first
|
|
|
|
|
std::sort(cs.pieces.begin(), cs.pieces.end()
|
|
|
|
@ -7600,12 +7600,12 @@ in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:48
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void torrent::abort()
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(209)">../src/torrent.cpp:6838</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><tr id="209" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(209)">../src/torrent.cpp:6843</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><tr id="209" style="display: none;" colspan="3"><td colspan="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
|
|
|
|
|
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</h2><h4>../src/torrent.cpp:6838</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
which are kept in sync</h2><h4>../src/torrent.cpp:6843</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
m_save_path = p;
|
|
|
|
|
#ifndef TORRENT_DISABLE_LOGGING
|
|
|
|
|
debug_log("loaded resume data: save-path: %s", m_save_path.c_str());
|
|
|
|
@ -7656,12 +7656,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:6838</h4><pre style="backgroun
|
|
|
|
|
m_file_priority[i] = file_priority.list_int_value_at(i, 1);
|
|
|
|
|
// this is suspicious, leave seed mode
|
|
|
|
|
if (m_file_priority[i] == 0) m_seed_mode = false;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(210)">../src/torrent.cpp:6971</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><tr id="210" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(210)">../src/torrent.cpp:6976</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><tr id="210" style="display: none;" colspan="3"><td colspan="3"><h2>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</h2><h4>../src/torrent.cpp:6971</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
|
|
|
|
no one uses merkle torrents</h2><h4>../src/torrent.cpp:6976</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7712,9 +7712,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:6971</h4><pre style="back
|
|
|
|
|
if (piece_priority && piece_priority.string_length()
|
|
|
|
|
== m_torrent_file->num_pieces())
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(211)">../src/torrent.cpp:7197</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><tr id="211" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(211)">../src/torrent.cpp:7202</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><tr id="211" style="display: none;" colspan="3"><td colspan="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.
|
|
|
|
|
using file_base</h2><h4>../src/torrent.cpp:7197</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file->num_pieces());
|
|
|
|
|
using file_base</h2><h4>../src/torrent.cpp:7202</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file->num_pieces());
|
|
|
|
|
if (!has_picker())
|
|
|
|
|
{
|
|
|
|
|
std::memset(&pieces[0], m_have_all, pieces.size());
|
|
|
|
@ -7765,9 +7765,9 @@ using file_base</h2><h4>../src/torrent.cpp:7197</h4><pre style="background: #f6f
|
|
|
|
|
{
|
|
|
|
|
error_code ec;
|
|
|
|
|
torrent_peer const* p = *i;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(212)">../src/torrent.cpp:9440</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><tr id="212" style="display: none;" colspan="3"><td colspan="3"><h2>add a flag to ignore stats, and only care about resume data for
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(212)">../src/torrent.cpp:9445</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><tr id="212" style="display: none;" colspan="3"><td colspan="3"><h2>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</h2><h4>../src/torrent.cpp:9440</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
|
|
|
|
|
just to save an empty resume data file</h2><h4>../src/torrent.cpp:9445</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
|
|
|
|
|
else seeds = m_peer_list ? m_peer_list->num_seeds() : 0;
|
|
|
|
|
|
|
|
|
|
if (m_incomplete != 0xffffff) downloaders = m_incomplete;
|
|
|
|
@ -7818,8 +7818,8 @@ just to save an empty resume data file</h2><h4>../src/torrent.cpp:9440</h4><pre
|
|
|
|
|
m_save_resume_flags = boost::uint8_t(flags);
|
|
|
|
|
state_updated();
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(213)">../src/torrent.cpp:11057</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="213" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
|
|
|
|
|
directly into the right place</h2><h4>../src/torrent.cpp:11057</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(213)">../src/torrent.cpp:11062</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="213" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
|
|
|
|
|
directly into the right place</h2><h4>../src/torrent.cpp:11062</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
|
|
|
|
|
, m_average_piece_time);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
@ -9050,10 +9050,10 @@ private:
|
|
|
|
|
// destructs.
|
|
|
|
|
//
|
|
|
|
|
// For more information on peer classes, see peer-classes_.
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(239)">../include/libtorrent/settings_pack.hpp:1094</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><tr id="239" style="display: none;" colspan="3"><td colspan="3"><h2>deprecate this
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(239)">../include/libtorrent/settings_pack.hpp:1092</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><tr id="239" style="display: none;" colspan="3"><td colspan="3"><h2>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.</h2><h4>../include/libtorrent/settings_pack.hpp:1094</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
and is disconnected.</h2><h4>../include/libtorrent/settings_pack.hpp:1092</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
// this is the minimum allowed announce interval for a tracker. This
|
|
|
|
|
// is specified in seconds and is used as a sanity check on what is
|
|
|
|
|
// returned from a tracker. It mitigates hammering misconfigured
|
|
|
|
@ -9453,7 +9453,7 @@ public:
|
|
|
|
|
item(entry const& v
|
|
|
|
|
, std::pair<char const*, int> salt
|
|
|
|
|
, boost::uint64_t seq, char const* pk, char const* sk);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(247)">../include/libtorrent/aux_/session_impl.hpp:858</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="247" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:858</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // client with the tracker only. It is randomized
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(247)">../include/libtorrent/aux_/session_impl.hpp:859</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="247" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:859</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // client with the tracker only. It is randomized
|
|
|
|
|
// at startup
|
|
|
|
|
int m_key;
|
|
|
|
|
|
|
|
|
@ -9504,7 +9504,7 @@ public:
|
|
|
|
|
// round-robin index into m_net_interfaces
|
|
|
|
|
mutable boost::uint8_t m_interface_index;
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(248)">../include/libtorrent/aux_/session_impl.hpp:909</a></td><td>replace this by a proper asio timer</td></tr><tr id="248" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:909</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(248)">../include/libtorrent/aux_/session_impl.hpp:910</a></td><td>replace this by a proper asio timer</td></tr><tr id="248" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:910</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
void open_new_incoming_socks_connection();
|
|
|
|
|
|
|
|
|
|
enum listen_on_flags_t
|
|
|
|
@ -9528,7 +9528,7 @@ public:
|
|
|
|
|
</div>
|
|
|
|
|
// this is used to decide when to recalculate which
|
|
|
|
|
// torrents to keep queued and which to activate
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(249)">../include/libtorrent/aux_/session_impl.hpp:914</a></td><td>replace this by a proper asio timer</td></tr><tr id="249" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:914</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(249)">../include/libtorrent/aux_/session_impl.hpp:915</a></td><td>replace this by a proper asio timer</td></tr><tr id="249" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:915</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
open_ssl_socket = 0x10
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -9554,7 +9554,7 @@ public:
|
|
|
|
|
// is only decresed when the unchoke set
|
|
|
|
|
// is recomputed, and when it reaches zero,
|
|
|
|
|
// the optimistic unchoke is moved to another peer.
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(250)">../include/libtorrent/aux_/session_impl.hpp:921</a></td><td>replace this by a proper asio timer</td></tr><tr id="250" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:921</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(250)">../include/libtorrent/aux_/session_impl.hpp:922</a></td><td>replace this by a proper asio timer</td></tr><tr id="250" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:922</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
#ifndef TORRENT_DISABLE_DHT
|
|
|
|
|
entry m_dht_state;
|
|
|
|
|
#endif
|
|
|
|
|