]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/listensocket.cpp
Add a way to disable using environment variables in included files.
[user/henk/code/inspircd.git] / src / listensocket.cpp
index 40639ba15f0d4f3c1107d049b062fa47dbc90f89..8c5fda59af0731b290b09ab8b89d23a56d4e0245 100644 (file)
@@ -48,8 +48,7 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
        }
 
        fd = socket(bind_to.family(), SOCK_STREAM, 0);
-
-       if (this->fd == -1)
+       if (!HasFd())
                return;
 
 #ifdef IPV6_V6ONLY
@@ -130,7 +129,7 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
 
 ListenSocket::~ListenSocket()
 {
-       if (this->GetFd() > -1)
+       if (this->HasFd())
        {
                ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Shut down listener on fd %d", this->fd);
                SocketEngine::Shutdown(this, 2);