From c6aac0f9af73183e3f3c262554e9dea0500731e4 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 3 Feb 2013 23:03:14 -0800 Subject: [PATCH] Fix a bug Arthur reported -- if you didn't configure for inbound connections, outbound peer and secure websocket connections wouldn't work. --- src/cpp/ripple/Application.cpp | 2 +- src/cpp/ripple/PeerDoor.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cpp/ripple/Application.cpp b/src/cpp/ripple/Application.cpp index bb615cec3..2f5d9f68a 100644 --- a/src/cpp/ripple/Application.cpp +++ b/src/cpp/ripple/Application.cpp @@ -166,7 +166,7 @@ void Application::setup() // // Allow peer connections. // - if (!theConfig.RUN_STANDALONE && !theConfig.PEER_IP.empty() && theConfig.PEER_PORT) + if (!theConfig.RUN_STANDALONE) { try { diff --git a/src/cpp/ripple/PeerDoor.cpp b/src/cpp/ripple/PeerDoor.cpp index 9ce77f45e..8d0c1c0ae 100644 --- a/src/cpp/ripple/PeerDoor.cpp +++ b/src/cpp/ripple/PeerDoor.cpp @@ -35,9 +35,12 @@ PeerDoor::PeerDoor(boost::asio::io_service& io_service) : if (1 != SSL_CTX_set_cipher_list(mCtx.native_handle(), theConfig.PEER_SSL_CIPHER_LIST.c_str())) std::runtime_error("Error setting cipher list (no valid ciphers)."); - Log(lsINFO) << "Peer port: " << theConfig.PEER_IP << " " << theConfig.PEER_PORT; - startListening(); + if (!theConfig.PEER_IP.empty() && theConfig.PEER_PORT) + { + Log(lsINFO) << "Peer port: " << theConfig.PEER_IP << " " << theConfig.PEER_PORT; + startListening(); + } } void PeerDoor::startListening()