diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-24 20:04:15 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-24 20:04:15 +0000 |
commit | 9c67795e733c553ff6b05398501d402c46349199 (patch) | |
tree | 06425c63f2fba3a83335da27188b013574f5fdc6 /src/dns.cpp | |
parent | 9fad3ecb9215a0034bf407f192926b04cb5efaed (diff) |
Get rid of OpenTCPSocket
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11969 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 7be0f6874..80909c0bb 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -306,13 +306,14 @@ void DNS::Rehash() irc::sockets::aptosa(ServerInstance->Config->DNSServer, DNS::QUERY_PORT, myserver); /* Initialize mastersocket */ - int s = irc::sockets::OpenTCPSocket(ServerInstance->Config->DNSServer, SOCK_DGRAM); + int s = socket(myserver.sa.sa_family, SOCK_DGRAM, 0); this->SetFd(s); - ServerInstance->SE->NonBlocking(this->GetFd()); /* Have we got a socket and is it nonblocking? */ if (this->GetFd() != -1) { + ServerInstance->SE->SetReuse(s); + ServerInstance->SE->NonBlocking(s); /* Bind the port - port 0 INADDR_ANY */ if (!ServerInstance->BindSocket(this->GetFd(), portpass, "", false)) { |