diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 6984f2ce7..b815420c1 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -499,7 +499,7 @@ namespace libtorrent { // we couldn't find the torrent! #ifdef TORRENT_VERBOSE_LOGGING - (*m_logger) << " couldn't find a torrent with the given info_hash\n"; + (*m_logger) << " couldn't find a torrent with the given info_hash: " << ih << "\n"; #endif throw std::runtime_error("got info-hash that is not in our session"); } @@ -2254,7 +2254,6 @@ namespace libtorrent assert(m_reading); m_reading = false; - if (error) { #ifdef TORRENT_VERBOSE_LOGGING diff --git a/src/torrent.cpp b/src/torrent.cpp index 2ac6d1895..6a711703d 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1779,7 +1779,7 @@ namespace libtorrent = instantiate_connection(m_ses.m_io_service, m_ses.peer_proxy()); boost::intrusive_ptr c(new bt_peer_connection( m_ses, shared_from_this(), s, a, peerinfo)); - + #ifndef NDEBUG c->m_in_constructor = false; #endif diff --git a/test/setup_transfer.cpp b/test/setup_transfer.cpp index 2b32a7f19..412ebddc4 100644 --- a/test/setup_transfer.cpp +++ b/test/setup_transfer.cpp @@ -52,7 +52,8 @@ setup_transfer(session* ses1, session* ses2, session* ses3 t.add_tracker(tracker_url); std::vector piece(16 * 1024); - std::fill(piece.begin(), piece.end(), 0xfe); + for (int i = 0; i < piece.size(); ++i) + piece[i] = (i % 26) + 'A'; // calculate the hash for all pieces int num = t.num_pieces(); @@ -71,7 +72,7 @@ setup_transfer(session* ses1, session* ses2, session* ses3 if (clear_files) remove_all("./tmp2/temporary"); t.create_torrent(); - + std::cerr << "generated torrent: " << t.info_hash() << std::endl; ses1->set_severity_level(alert::debug); ses2->set_severity_level(alert::debug); diff --git a/test/test_metadata_extension.cpp b/test/test_metadata_extension.cpp index 8cb172ed8..ac1cc7289 100644 --- a/test/test_metadata_extension.cpp +++ b/test/test_metadata_extension.cpp @@ -21,6 +21,11 @@ void test_transfer(bool clear_files = true, bool disconnect = false) ses2.add_extension(&create_metadata_plugin); torrent_handle tor1; torrent_handle tor2; + pe_settings pes; + pes.out_enc_policy = pe_settings::disabled; + pes.in_enc_policy = pe_settings::disabled; + ses1.set_pe_settings(pes); + ses2.set_pe_settings(pes); boost::tie(tor1, tor2, ignore) = setup_transfer(&ses1, &ses2, 0, clear_files);