*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-07-06 18:20:07 +00:00
parent 43ba2b35d1
commit d1577962db
6 changed files with 18 additions and 8 deletions

View File

@ -244,7 +244,7 @@ int main(int argc, char* argv[])
session ses(fingerprint("LT", 0, 1, 0, 0));
ses.listen_on(std::make_pair(6881, 6889));
ses.set_upload_rate_limit(100000);
ses.set_upload_rate_limit(1000);
// ses.set_download_rate_limit(50000);
ses.set_http_settings(settings);
ses.set_severity_level(alert::debug);

View File

@ -338,9 +338,11 @@ namespace libtorrent
return "SimpleBT";
}
if (std::equal(PID, PID + 8, "turbobt"))
if (std::equal(PID, PID + 7, "turbobt"))
{
return "TurboBT";
std::stringstream s;
s << "TurboBT " << PID[8] << "." << PID[10] << "." << PID[12];
return s.str();
}
if (std::equal(PID, PID + 13, "\0\0\0\0\0\0\0\0\0\0\0\0\x97"))

View File

@ -402,7 +402,6 @@ namespace libtorrent
, m_send_buffer.begin() + pos + 8
, 0);
// indicate that we support the extension protocol
// curently disabled
#ifdef TORRENT_ENABLE_EXTENSIONS
m_send_buffer[pos+7] = 0x01;
#endif

View File

@ -867,7 +867,8 @@ namespace libtorrent
if (i->banned) return;
if (m_torrent->num_peers() < m_max_connections)
if (m_torrent->num_peers() < m_max_connections
&& !m_torrent->is_paused())
{
connect_peer(&*i);
}

View File

@ -131,8 +131,7 @@ namespace libtorrent { namespace detail
peer_id id;
std::fill(id.begin(), id.end(), 0);
for (std::vector<address>::const_iterator i = t->peers.begin();
i != t->peers.end();
++i)
i != t->peers.end(); ++i)
{
t->torrent_ptr->get_policy().peer_from_tracker(*i, id);
}

View File

@ -251,7 +251,16 @@ namespace libtorrent
m_currently_trying_tracker = 0;
m_duration = interval;
m_next_request = boost::posix_time::second_clock::local_time() + boost::posix_time::seconds(m_duration);
if (peer_list.empty())
{
// if the peer list is empty, we should contact the
// tracker soon again to see if there are any peers
m_next_request = boost::posix_time::second_clock::local_time() + boost::posix_time::seconds(60);
}
else
{
m_next_request = boost::posix_time::second_clock::local_time() + boost::posix_time::seconds(m_duration);
}
// connect to random peers from the list
std::random_shuffle(peer_list.begin(), peer_list.end());