diff --git a/libtorrent/dht_flood.py b/libtorrent/dht_flood.py index 84169a59..1e37208a 100755 --- a/libtorrent/dht_flood.py +++ b/libtorrent/dht_flood.py @@ -60,9 +60,9 @@ query = 'get_peers' print 'test random info-hashes' for i in xrange(1, 30000): - send_dht_message({'a': {'id': node_id, 'info_hash': random_key()}, 'q': query, 'z': 'q', 't': '%d' % i}) + send_dht_message({'x': {'id': node_id, 'info_hash': random_key()}, 'q': query, 'z': 'q', 't': '%d' % i}) print 'test random peer-ids' for i in xrange(1, 30000): - send_dht_message({'a': {'id': random_key(), 'info_hash': random_key()}, 'q': query, 'z': 'q', 't': '%d' % i}) + send_dht_message({'x': {'id': random_key(), 'info_hash': random_key()}, 'q': query, 'z': 'q', 't': '%d' % i}) diff --git a/libtorrent/src/kademlia/find_data.cpp b/libtorrent/src/kademlia/find_data.cpp index 024cb5e6..5a2f6087 100644 --- a/libtorrent/src/kademlia/find_data.cpp +++ b/libtorrent/src/kademlia/find_data.cpp @@ -207,7 +207,7 @@ bool find_data::invoke(observer_ptr o) entry e; e["z"] = "q"; e["q"] = "get_peers"; - entry& a = e["a"]; + entry& a = e["x"]; a["info_hash"] = m_target.to_string(); if (m_noseeds) a["noseed"] = 1; return m_node.m_rpc.invoke(e, o->target_ep(), o); diff --git a/libtorrent/src/kademlia/node.cpp b/libtorrent/src/kademlia/node.cpp index f66901d9..2226feee 100644 --- a/libtorrent/src/kademlia/node.cpp +++ b/libtorrent/src/kademlia/node.cpp @@ -283,7 +283,7 @@ namespace entry e; e["z"] = "q"; e["q"] = "announce_peer"; - entry& a = e["a"]; + entry& a = e["x"]; a["info_hash"] = ih.to_string(); a["port"] = listen_port; a["token"] = i->second; @@ -608,7 +608,7 @@ void node_impl::incoming_request(msg const& m, entry& e) key_desc_t top_desc[] = { {"q", lazy_entry::string_t, 0, 0}, - {"a", lazy_entry::dict_t, 0, key_desc_t::parse_children}, + {"x", lazy_entry::dict_t, 0, key_desc_t::parse_children}, {"id", lazy_entry::string_t, 20, key_desc_t::last_child}, }; diff --git a/libtorrent/src/kademlia/refresh.cpp b/libtorrent/src/kademlia/refresh.cpp index 4b9b05e8..33a50bb4 100644 --- a/libtorrent/src/kademlia/refresh.cpp +++ b/libtorrent/src/kademlia/refresh.cpp @@ -73,7 +73,7 @@ bool refresh::invoke(observer_ptr o) entry e; e["z"] = "q"; e["q"] = "find_node"; - entry& a = e["a"]; + entry& a = e["x"]; a["target"] = target().to_string(); return m_node.m_rpc.invoke(e, o->target_ep(), o); } diff --git a/libtorrent/src/kademlia/rpc_manager.cpp b/libtorrent/src/kademlia/rpc_manager.cpp index 491870d8..66132217 100644 --- a/libtorrent/src/kademlia/rpc_manager.cpp +++ b/libtorrent/src/kademlia/rpc_manager.cpp @@ -466,7 +466,7 @@ bool rpc_manager::invoke(entry& e, udp::endpoint target_addr if (m_destructing) return false; e["z"] = "q"; - entry& a = e["a"]; + entry& a = e["x"]; add_our_id(a); std::string transaction_id; diff --git a/libtorrent/test/test_dht.cpp b/libtorrent/test/test_dht.cpp index 43100f37..3fbde690 100644 --- a/libtorrent/test/test_dht.cpp +++ b/libtorrent/test/test_dht.cpp @@ -107,7 +107,7 @@ void send_dht_msg(node_impl& node, char const* msg, udp::endpoint const& ep e["q"] = msg; e["t"] = t; e["z"] = "q"; - entry::dictionary_type& a = e["a"].dict(); + entry::dictionary_type& a = e["x"].dict(); a["id"] = generate_next().to_string(); if (info_hash) a["info_hash"] = std::string(info_hash, 20); if (name) a["n"] = name;