]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/listensocket.cpp
Fix sqllog compile error
[user/henk/code/inspircd.git] / src / listensocket.cpp
index 43584eae1d28051432859136bd20206fb9f6905a..f0daf8ef0cc549ba339dd97eb815a041810b5f6a 100644 (file)
@@ -31,11 +31,12 @@ ListenSocket::ListenSocket(ConfigTag* tag, const std::string& addr, int port)
        irc::sockets::satoap(bind_to, bind_addr, bind_port);
        bind_desc = irc::sockets::satouser(bind_to);
 
-       fd = irc::sockets::OpenTCPSocket(bind_addr);
+       fd = socket(bind_to.sa.sa_family, SOCK_STREAM, 0);
 
        if (this->fd > -1)
        {
-               int rv = ServerInstance->SE->Bind(this->fd, &bind_to.sa, sizeof(bind_to));
+               ServerInstance->SE->SetReuse(fd);
+               int rv = ServerInstance->SE->Bind(this->fd, bind_to);
                if (rv >= 0)
                        rv = ServerInstance->SE->Listen(this->fd, ServerInstance->Config->MaxConn);