From 07e0f5094590ff9022dcd3b8cf7a8b76e42af7a8 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 29 Jul 2013 19:23:10 -0300 Subject: [PATCH] change bittorrent protocol string --- libtorrent/examples/connection_tester.cpp | 2 +- libtorrent/src/bt_peer_connection.cpp | 6 +++--- libtorrent/test/test_fast_extension.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libtorrent/examples/connection_tester.cpp b/libtorrent/examples/connection_tester.cpp index c4460416..8f1c0f3f 100644 --- a/libtorrent/examples/connection_tester.cpp +++ b/libtorrent/examples/connection_tester.cpp @@ -173,7 +173,7 @@ struct peer_conn return; } - char handshake[] = "\x13" "BitTorrent protocol\0\0\0\0\0\0\0\x04" + char handshake[] = "\x13" "twister protocollll\0\0\0\0\0\0\0\x04" " " // space for info-hash "aaaaaaaaaaaaaaaaaaaa" // peer-id "\0\0\0\x01\x02"; // interested diff --git a/libtorrent/src/bt_peer_connection.cpp b/libtorrent/src/bt_peer_connection.cpp index 73f27c29..ecdd7667 100644 --- a/libtorrent/src/bt_peer_connection.cpp +++ b/libtorrent/src/bt_peer_connection.cpp @@ -701,7 +701,7 @@ namespace libtorrent TORRENT_ASSERT(t); // add handshake to the send buffer - const char version_string[] = "BitTorrent protocol"; + const char version_string[] = "twister protocollll"; const int string_len = sizeof(version_string)-1; char handshake[1 + string_len + 8 + 20 + 20]; @@ -2888,7 +2888,7 @@ namespace libtorrent recv_buffer = receive_buffer(); int packet_size = recv_buffer[0]; - const char protocol_string[] = "\x13" "BitTorrent protocol"; + const char protocol_string[] = "\x13" "twister protocollll"; if (packet_size != 19 || memcmp(recv_buffer.begin, protocol_string, 20) != 0) @@ -2954,7 +2954,7 @@ namespace libtorrent #endif #ifdef TORRENT_VERBOSE_LOGGING - peer_log("<== BitTorrent protocol"); + peer_log("<== twister protocollll"); #endif } diff --git a/libtorrent/test/test_fast_extension.cpp b/libtorrent/test/test_fast_extension.cpp index 053fe161..d0ed4111 100644 --- a/libtorrent/test/test_fast_extension.cpp +++ b/libtorrent/test/test_fast_extension.cpp @@ -189,7 +189,7 @@ void send_bitfield(stream_socket& s, char const* bits) void do_handshake(stream_socket& s, sha1_hash const& ih, char* buffer) { - char handshake[] = "\x13" "BitTorrent protocol\0\0\0\0\0\0\0\x04" + char handshake[] = "\x13" "twister protocollll\0\0\0\0\0\0\0\x04" " " // space for info-hash "aaaaaaaaaaaaaaaaaaaa"; // peer-id std::cout << time_now_string() << " ==> handshake" << std::endl; @@ -209,7 +209,7 @@ void do_handshake(stream_socket& s, sha1_hash const& ih, char* buffer) std::cout << time_now_string() << " <== handshake" << std::endl; TEST_CHECK(buffer[0] == 19); - TEST_CHECK(std::memcmp(buffer + 1, "BitTorrent protocol", 19) == 0); + TEST_CHECK(std::memcmp(buffer + 1, "twister protocollll", 19) == 0); char* extensions = buffer + 20; // check for fast extension support