X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsocket.cpp;h=0ceb40330650f1ca9668aaa020190df05b956f0b;hb=235864add961270140c956647d783fa79b5f7120;hp=049d3a2379b6d81e91bb387e94f9d52a824a9574;hpb=800f02e7599d5f90d1c16f02cb1c28901d354140;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/socket.cpp b/src/socket.cpp index 049d3a237..0ceb40330 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -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::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++; @@ -123,7 +125,7 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports) n++; if (n == ports.end()) { - this->Logs->Log("SOCKET",ERROR,"Port bindings slipped out of vector, aborting close!"); + this->Logs->Log("SOCKET",DEFAULT,"Port bindings slipped out of vector, aborting close!"); break; }