fixed release build

This commit is contained in:
Arvid Norberg 2012-01-23 05:14:12 +00:00
parent 1a32205944
commit 818620a5a8
2 changed files with 17 additions and 17 deletions

View File

@ -852,6 +852,13 @@ namespace libtorrent
void clear_in_state_update()
{ m_in_state_updates = false; }
void inc_num_connecting()
{ ++m_num_connecting; }
void dec_num_connecting()
{
TORRENT_ASSERT(m_num_connecting > 0);
--m_num_connecting;
}
#ifdef TORRENT_USE_OPENSSL
void set_ssl_cert(std::string const& certificate
, std::string const& private_key
@ -955,15 +962,16 @@ namespace libtorrent
public:
#endif
std::set<peer_connection*> m_connections;
#ifdef TORRENT_DEBUG
private:
#endif
// of all peers in m_connections, this is the number
// of peers that are outgoing and still waiting to
// complete the connection. This is used to possibly
// kick out these connections when we get incoming
// connections (if we've reached the connection limit)
int m_num_connecting;
#ifdef TORRENT_DEBUG
private:
#endif
// The list of web seeds in this torrent. Seeds
// with fatal errors are removed from the set

View File

@ -204,10 +204,7 @@ namespace libtorrent
// if t is NULL, we better not be connecting, since
// we can't decrement the connecting counter
TORRENT_ASSERT(t || !m_connecting);
if (m_connecting && t)
{
++t->m_num_connecting;
}
if (m_connecting && t) t->inc_num_connecting();
m_est_reciprocation_rate = m_ses.m_settings.default_est_reciprocation_rate;
#if TORRENT_USE_I2P
@ -928,8 +925,7 @@ namespace libtorrent
TORRENT_ASSERT(!m_connecting);
if (m_connecting && t)
{
TORRENT_ASSERT(t->m_num_connecting > 0);
--t->m_num_connecting;
t->dec_num_connecting();
m_connecting = false;
}
@ -3419,8 +3415,7 @@ namespace libtorrent
boost::shared_ptr<torrent> t = m_torrent.lock();
if (m_connecting)
{
TORRENT_ASSERT(t->m_num_connecting > 0);
--t->m_num_connecting;
t->dec_num_connecting();
m_connecting = false;
}
@ -3553,8 +3548,7 @@ namespace libtorrent
boost::shared_ptr<torrent> t = m_torrent.lock();
if (m_connecting)
{
TORRENT_ASSERT(t->m_num_connecting > 0);
--t->m_num_connecting;
t->dec_num_connecting();
m_connecting = false;
}
if (m_connection_ticket >= 0)
@ -4089,8 +4083,7 @@ namespace libtorrent
TORRENT_ASSERT(t || !m_connecting);
if (m_connecting && t)
{
TORRENT_ASSERT(t->m_num_connecting > 0);
--t->m_num_connecting;
t->dec_num_connecting();
m_connecting = false;
}
disconnect(errors::torrent_aborted);
@ -5475,8 +5468,7 @@ namespace libtorrent
TORRENT_ASSERT(t || !m_connecting);
if (m_connecting && t)
{
TORRENT_ASSERT(t->m_num_connecting > 0);
--t->m_num_connecting;
t->dec_num_connecting();
m_connecting = false;
}
m_ses.m_half_open.done(m_connection_ticket);