forked from premiere/premiere-libtorrent
merge fix
This commit is contained in:
parent
e405f0e02f
commit
b8bfc13d59
|
@ -78,7 +78,7 @@ void get_item::got_data(bdecode_node const& v,
|
||||||
// data can reach here, which means pk and sig must be valid.
|
// data can reach here, which means pk and sig must be valid.
|
||||||
if (!pk || !sig) return;
|
if (!pk || !sig) return;
|
||||||
|
|
||||||
std::string temp_copy(m_data.salt());
|
std::string temp_copy(m_data.salt());
|
||||||
std::pair<char const*, int> salt(temp_copy.c_str(), int(temp_copy.size()));
|
std::pair<char const*, int> salt(temp_copy.c_str(), int(temp_copy.size()));
|
||||||
sha1_hash incoming_target = item_target_id(salt, pk);
|
sha1_hash incoming_target = item_target_id(salt, pk);
|
||||||
if (incoming_target != m_target) return;
|
if (incoming_target != m_target) return;
|
||||||
|
|
|
@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "libtorrent/ip_filter.hpp"
|
#include "libtorrent/ip_filter.hpp"
|
||||||
#include "setup_transfer.hpp" // for addr()
|
#include "setup_transfer.hpp" // for addr()
|
||||||
#include <boost/utility.hpp>
|
#include <utility>
|
||||||
|
|
||||||
#include "test.hpp"
|
#include "test.hpp"
|
||||||
#include "libtorrent/socket_io.hpp"
|
#include "libtorrent/socket_io.hpp"
|
||||||
|
@ -78,7 +78,7 @@ void test_rules_invariant(std::vector<ip_range<T> > const& r, ip_filter const& f
|
||||||
TEST_CHECK(r.back().last == addr("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"));
|
TEST_CHECK(r.back().last == addr("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (iterator i(r.begin()), j(boost::next(r.begin()))
|
for (iterator i(r.begin()), j(std::next(r.begin()))
|
||||||
, end(r.end()); j != end; ++j, ++i)
|
, end(r.end()); j != end; ++j, ++i)
|
||||||
{
|
{
|
||||||
TEST_EQUAL(f.access(i->last), int(i->flags));
|
TEST_EQUAL(f.access(i->last), int(i->flags));
|
||||||
|
@ -93,7 +93,7 @@ TORRENT_TEST(session_get_ip_filter)
|
||||||
session ses;
|
session ses;
|
||||||
ip_filter const& ipf = ses.get_ip_filter();
|
ip_filter const& ipf = ses.get_ip_filter();
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
TEST_EQUAL(boost::get<0>(ipf.export_filter()).size(), 1);
|
TEST_EQUAL(std::get<0>(ipf.export_filter()).size(), 1);
|
||||||
#else
|
#else
|
||||||
TEST_EQUAL(ipf.export_filter().size(), 1);
|
TEST_EQUAL(ipf.export_filter().size(), 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue