update our id in the rpc manager when it changes (#942)
update our id in the rpc manager when it changes
This commit is contained in:
parent
f05fad0d41
commit
3321ca10f1
|
@ -25,6 +25,7 @@
|
||||||
* fix set_settings in python binding
|
* fix set_settings in python binding
|
||||||
* Added missing alert categories in python binding
|
* Added missing alert categories in python binding
|
||||||
* Added dht_get_peers_reply_alert alert in python binding
|
* Added dht_get_peers_reply_alert alert in python binding
|
||||||
|
* fixed updating the node id reported to peers after changing IPs
|
||||||
|
|
||||||
1.1.0 release
|
1.1.0 release
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,8 @@ public:
|
||||||
|
|
||||||
int num_allocated_observers() const { return m_allocated_observers; }
|
int num_allocated_observers() const { return m_allocated_observers; }
|
||||||
|
|
||||||
|
void update_node_id(node_id const& id) { m_our_id = id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
boost::uint32_t calc_connection_id(udp::endpoint addr);
|
boost::uint32_t calc_connection_id(udp::endpoint addr);
|
||||||
|
|
|
@ -138,6 +138,7 @@ void node::update_node_id()
|
||||||
m_id = generate_id(m_observer->external_address());
|
m_id = generate_id(m_observer->external_address());
|
||||||
|
|
||||||
m_table.update_node_id(m_id);
|
m_table.update_node_id(m_id);
|
||||||
|
m_rpc.update_node_id(m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool node::verify_token(std::string const& token, char const* info_hash
|
bool node::verify_token(std::string const& token, char const* info_hash
|
||||||
|
|
Loading…
Reference in New Issue