summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-21 20:47:02 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-21 20:47:02 +0000
commitd29ca254a4a9062ecaffe9395454f3a654d4e06a (patch)
treeb4af3499f3e3a341f1fcadaf21228b592a84dd78 /src/socket.cpp
parent8a11f8ecddaaf6c8162d93a28d924fe0b566332c (diff)
Remove unneeded save of errno
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12309 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 0f2fbea22..0ceb40330 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -86,8 +86,9 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports)
while (0 != (portno = portrange.GetToken()))
{
irc::sockets::sockaddrs bindspec;
- irc::sockets::aptosa(Addr, portno, bindspec);
- std::string bind_readable = irc::sockets::satouser(bindspec);
+ if (!irc::sockets::aptosa(Addr, portno, bindspec))
+ continue;
+ std::string bind_readable = bindspec.str();
bool skip = false;
for (std::vector<ListenSocket*>::iterator n = old_ports.begin(); n != old_ports.end(); ++n)
@@ -101,7 +102,8 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports)
}
if (!skip)
{
- ListenSocket *ll = new ListenSocket(tag, Addr, portno);
+ ListenSocket* ll = new ListenSocket(tag, bindspec);
+
if (ll->GetFd() > -1)
{
bound++;