forked from premiere/premiere-libtorrent
added another assert in policy
This commit is contained in:
parent
daf7314476
commit
7a4750d540
|
@ -37,6 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#endif
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
|
@ -55,6 +56,7 @@ namespace libtorrent
|
|||
}
|
||||
|
||||
using namespace boost::posix_time;
|
||||
using boost::bind;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -1048,6 +1050,10 @@ namespace libtorrent
|
|||
{
|
||||
INVARIANT_CHECK;
|
||||
|
||||
assert(std::find_if(m_peers.begin(), m_peers.end()
|
||||
, bind(std::equal_to<peer_connection*>(), bind(&peer::connection, _1)
|
||||
, &c)) != m_peers.end());
|
||||
|
||||
// if the peer is choked and we have upload slots left,
|
||||
// then unchoke it. Another condition that has to be met
|
||||
// is that the torrent doesn't keep track of the individual
|
||||
|
|
|
@ -305,7 +305,7 @@ namespace libtorrent
|
|||
try
|
||||
{
|
||||
m_creation_date = ptime(date(1970, Jan, 1))
|
||||
+ seconds(torrent_file["creation date"].integer());
|
||||
+ seconds(long(torrent_file["creation date"].integer()));
|
||||
}
|
||||
catch (type_error) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue