mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
IPEndpoint better parsing
This commit is contained in:
@@ -197,10 +197,10 @@ IPEndpoint& IPEndpoint::operator= (IPEndpoint const& other)
|
|||||||
|
|
||||||
IPEndpoint IPEndpoint::from_string (std::string const& s)
|
IPEndpoint IPEndpoint::from_string (std::string const& s)
|
||||||
{
|
{
|
||||||
std::stringstream ss (s);
|
std::stringstream is (s);
|
||||||
IPEndpoint ep;
|
IPEndpoint ep;
|
||||||
ss >> ep;
|
is >> ep;
|
||||||
if (! ss.fail())
|
if (! is.fail() && is.rdbuf()->in_avail() == 0)
|
||||||
return ep;
|
return ep;
|
||||||
return IPEndpoint();
|
return IPEndpoint();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user