Changeset 4027
- Timestamp:
- 10/17/08 17:54:07 (3 months ago)
- Files:
-
- 8 modified
-
branches/1.0.0_RC/libtorrent/src/peer_connection.cpp (modified) (1 diff)
-
branches/1.0.0_RC/libtorrent/src/piece_picker.cpp (modified) (1 diff)
-
branches/1.0.0_RC/libtorrent/src/policy.cpp (modified) (1 diff)
-
branches/1.0.0_RC/libtorrent/src/torrent_info.cpp (modified) (1 diff)
-
trunk/libtorrent/src/peer_connection.cpp (modified) (1 diff)
-
trunk/libtorrent/src/piece_picker.cpp (modified) (1 diff)
-
trunk/libtorrent/src/policy.cpp (modified) (1 diff)
-
trunk/libtorrent/src/torrent_info.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0.0_RC/libtorrent/src/peer_connection.cpp
r4013 r4027 305 305 boost::shared_ptr<torrent> t2 = rhs.associated_torrent().lock(); 306 306 TORRENT_ASSERT(t2); 307 if (!is_choked()) c1 -= t1->torrent_file().piece_length();308 if (!rhs.is_choked()) c2 -= t2->torrent_file().piece_length();307 if (!is_choked()) c1 -= (std::max)(t1->torrent_file().piece_length(), 256 * 1024); 308 if (!rhs.is_choked()) c2 -= (std::max)(t2->torrent_file().piece_length(), 256 * 1024); 309 309 310 310 return c1 < c2; -
branches/1.0.0_RC/libtorrent/src/piece_picker.cpp
r4002 r4027 996 996 #ifdef TORRENT_PICKER_LOG 997 997 print_pieces(); 998 #endif999 1000 #ifndef NDEBUG1001 check_invariant();1002 998 #endif 1003 999 } -
branches/1.0.0_RC/libtorrent/src/policy.cpp
r4013 r4027 339 339 if (m_torrent->has_picker()) 340 340 p = &m_torrent->picker(); 341 for (iterator i = m_peers.begin() 342 , end(m_peers.end()); i != end;) 341 for (iterator i = m_peers.begin(); i != m_peers.end();) 343 342 { 344 343 if ((ses.m_ip_filter.access(i->second.addr) & ip_filter::blocked) == 0) -
branches/1.0.0_RC/libtorrent/src/torrent_info.cpp
r3942 r4027 310 310 if (ret < 0) return; 311 311 312 if (buf.empty()) 313 #ifndef BOOST_NO_EXCEPTIONS 314 throw invalid_torrent_file(); 315 #else 316 return; 317 #endif 318 312 319 lazy_entry e; 313 320 lazy_bdecode(&buf[0], &buf[0] + buf.size(), e); -
trunk/libtorrent/src/peer_connection.cpp
r4013 r4027 305 305 boost::shared_ptr<torrent> t2 = rhs.associated_torrent().lock(); 306 306 TORRENT_ASSERT(t2); 307 if (!is_choked()) c1 -= t1->torrent_file().piece_length();308 if (!rhs.is_choked()) c2 -= t2->torrent_file().piece_length();307 if (!is_choked()) c1 -= (std::max)(t1->torrent_file().piece_length(), 256 * 1024); 308 if (!rhs.is_choked()) c2 -= (std::max)(t2->torrent_file().piece_length(), 256 * 1024); 309 309 310 310 return c1 < c2; -
trunk/libtorrent/src/piece_picker.cpp
r4002 r4027 996 996 #ifdef TORRENT_PICKER_LOG 997 997 print_pieces(); 998 #endif999 1000 #ifndef NDEBUG1001 check_invariant();1002 998 #endif 1003 999 } -
trunk/libtorrent/src/policy.cpp
r4013 r4027 339 339 if (m_torrent->has_picker()) 340 340 p = &m_torrent->picker(); 341 for (iterator i = m_peers.begin() 342 , end(m_peers.end()); i != end;) 341 for (iterator i = m_peers.begin(); i != m_peers.end();) 343 342 { 344 343 if ((ses.m_ip_filter.access(i->second.addr) & ip_filter::blocked) == 0) -
trunk/libtorrent/src/torrent_info.cpp
r3942 r4027 310 310 if (ret < 0) return; 311 311 312 if (buf.empty()) 313 #ifndef BOOST_NO_EXCEPTIONS 314 throw invalid_torrent_file(); 315 #else 316 return; 317 #endif 318 312 319 lazy_entry e; 313 320 lazy_bdecode(&buf[0], &buf[0] + buf.size(), e);
