diff --git a/src/ripple/peerfinder/impl/Manager.cpp b/src/ripple/peerfinder/impl/Manager.cpp index 06635a3c9..b97321d4b 100644 --- a/src/ripple/peerfinder/impl/Manager.cpp +++ b/src/ripple/peerfinder/impl/Manager.cpp @@ -296,11 +296,13 @@ public: void addFallbackStrings (std::string const& name, std::vector const& strings) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind ( &Logic::addStaticSource, &m_logic, SourceStrings::New (name, strings)))); +#endif } void addFallbackURL (std::string const& name, std::string const& url) @@ -310,59 +312,73 @@ public: void onPeerConnectAttemptBegins (IPAddress const& address) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerConnectAttemptBegins, &m_logic, address))); +#endif } void onPeerConnectAttemptCompletes (IPAddress const& address, bool success) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerConnectAttemptCompletes, &m_logic, address, success))); +#endif } void onPeerConnected (const IPAddress &address, bool incoming) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerConnected, &m_logic, address, incoming))); +#endif } void onPeerHandshake (PeerID const& id, IPAddress const& address, bool incoming) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerHandshake, &m_logic, id, address, incoming))); +#endif } void onPeerDisconnected (const PeerID& id) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerDisconnected, &m_logic, id))); +#endif } void onPeerLegacyEndpoint (IPAddress const& ep) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( m_context.wrap ( bind (&Logic::onPeerLegacyEndpoint, &m_logic, ep))); +#endif } void onPeerEndpoints (PeerID const& id, std::vector const& endpoints) { +#if RIPPLE_USE_PEERFINDER m_queue.dispatch ( beast::bind (&Logic::onPeerEndpoints, &m_logic, id, endpoints)); +#endif } //-------------------------------------------------------------------------- diff --git a/src/ripple_app/peers/Peer.cpp b/src/ripple_app/peers/Peer.cpp index d395b4f82..91300eccb 100644 --- a/src/ripple_app/peers/Peer.cpp +++ b/src/ripple_app/peers/Peer.cpp @@ -651,8 +651,10 @@ void PeerImp::connect (const std::string& strIp, int iPort) void PeerImp::handleConnect (const boost::system::error_code& error, boost::asio::ip::tcp::resolver::iterator it) { // Notify peer finder about the status of this in-progress connection attempt +#if RIPPLE_USE_PEERFINDER getApp ().getPeers ().getPeerFinder ().onPeerConnectAttemptCompletes( IPAddress::from_string(getIP()).withPort(getPort()), !error ); +#endif if (error) {