From 248a14477c435ef28b71df42080ec931b1003e3f Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 1 Sep 2009 15:08:09 +0000 Subject: Remove unneeded #ifdef IPV6 lines git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11582 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/threadengines/threadengine_win32.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/threadengines') diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index 361d25cc4..2676bc6f6 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -75,7 +75,7 @@ class ThreadSignalSocket : public BufferedSocket class ThreadSignalListener : public ListenSocketBase { SocketThread* parent; - irc::sockets::insp_sockaddr sock_us; + sockaddr_in sock_us; public: ThreadSignalListener(SocketThread* t, InspIRCd* Instance, int port, const std::string &addr) : ListenSocketBase(Instance, port, addr), parent(t) { @@ -94,11 +94,7 @@ class ThreadSignalListener : public ListenSocketBase /* Using getsockname and ntohs, we can determine which port number we were allocated */ int GetPort() { -#ifdef IPV6 - return ntohs(sock_us.sin6_port); -#else return ntohs(sock_us.sin_port); -#endif } }; @@ -111,17 +107,10 @@ SocketThread::SocketThread(InspIRCd* SI) if (connFD == -1) throw CoreException("Could not create ITC pipe"); - irc::sockets::insp_sockaddr addr; - -#ifdef IPV6 - irc::sockets::insp_aton("::1", &addr.sin6_addr); - addr.sin6_family = AF_INET6; - addr.sin6_port = htons(listener->GetPort()); -#else - irc::sockets::insp_aton("127.0.0.1", &addr.sin_addr); + struct sockaddr_in addr; + inet_aton("127.0.0.1", &addr.sin_addr); addr.sin_family = AF_INET; addr.sin_port = htons(listener->GetPort()); -#endif if (connect(connFD, reinterpret_cast(&addr), sizeof(addr)) == -1) { -- cgit v1.2.3