From c6e3bd2b5729ec660870022d2f08124f2bddee41 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 25 Mar 2009 17:57:55 +0000 Subject: Fix some win32 compile errors, thanks for error output therock247uk git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11263 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/threadengines/threadengine_win32.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index a20251348..449530e46 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -53,9 +53,9 @@ void ThreadData::FreeThread(Thread* thread) class ThreadSignalSocket : public BufferedSocket { - SignalThread* parent; + SocketThread* parent; public: - ThreadSignalSocket(SignalThread* t, InspIRCd* SI, int newfd, char* ip) + ThreadSignalSocket(SocketThread* t, InspIRCd* SI, int newfd, char* ip) : BufferedSocket(SI, newfd, ip), parent(t) { parent->results = this; @@ -113,12 +113,12 @@ SocketThread::SocketThread(InspIRCd* SI) if (connFD == -1) throw CoreException("Could not create ITC pipe"); - irc::sockets::sockaddrs addr; - irc::sockets::insp_aton("127.0.0.1", &addr.in4.sin_addr); - addr.in4.sin_family = AF_INET; - addr.in4.sin_port = htons(listener->GetPort()); + struct sockaddr_in addr; + irc::sockets::insp_aton("127.0.0.1", &addr.sin_addr); + addr.sin_family = AF_INET; + addr.sin_port = htons(listener->GetPort()); - if (connect(connFD, &addr.sa, sizeof(addr.in4)) == -1) + if (connect(connFD, static_cast(&addr), sizeof(addr)) == -1) { ServerInstance->SE->DelFd(listener); close(connFD); @@ -135,5 +135,9 @@ void SocketThread::NotifyParent() SocketThread::~SocketThread() { - close(signal.connFD); + if (signal.connFD >= 0) + { + shutdown(signal.connFD, 2); + close(signal.connFD); + } } -- cgit v1.2.3