JoelKatz

Untitled

Nov 12th, 2013
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. diff --git a/src/ripple_app/websocket/WSConnection.cpp b/src/ripple_app/websocket/WSConnection.cpp
  2. index df8054d..4e3d3bf 100644
  3. --- a/src/ripple_app/websocket/WSConnection.cpp
  4. +++ b/src/ripple_app/websocket/WSConnection.cpp
  5. @@ -23,7 +23,7 @@ SETUP_LOGN (WSConnection, "WSConnection")
  6. static std::string trimIP(const std::string& ip)
  7. { // Make sure there's no port
  8. size_t pos = ip.find(':');
  9. - return (pos == std::string::npos) ? ip : ip.substr(0, pos - 1);
  10. + return (pos == std::string::npos) ? ip : ip.substr(0, pos);
  11. }
  12.  
  13. //------------------------------------------------------------------------------
  14. @@ -34,7 +34,7 @@ WSConnection::WSConnection (Resource::Manager& resourceManager,
  15. : InfoSub (source, usage)
  16. , m_resourceManager (resourceManager)
  17. , m_isPublic (isPublic)
  18. - , m_remoteIP (remoteIP)
  19. + , m_remoteIP (trimIP(remoteIP))
  20. , m_receiveQueueMutex (this, "WSConnection", __FILE__, __LINE__)
  21. , m_netOPs (getApp ().getOPs ())
  22. , m_pingTimer (io_service)
Advertisement
Add Comment
Please, Sign In to add comment