summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-25 19:22:41 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-25 19:22:41 +0000
commita3d9b31cb6eadd8960f2504d08c625c2dc9d03e8 (patch)
tree7c677c332989295a9fc111090715cb560385c65e /src
parentc6e3bd2b5729ec660870022d2f08124f2bddee41 (diff)
Make this compile
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11264 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/threadengines/threadengine_win32.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp
index 449530e46..30f65ae74 100644
--- a/src/threadengines/threadengine_win32.cpp
+++ b/src/threadengines/threadengine_win32.cpp
@@ -58,7 +58,6 @@ class ThreadSignalSocket : public BufferedSocket
ThreadSignalSocket(SocketThread* t, InspIRCd* SI, int newfd, char* ip)
: BufferedSocket(SI, newfd, ip), parent(t)
{
- parent->results = this;
}
virtual bool OnDataReady()
@@ -106,7 +105,7 @@ class ThreadSignalListener : public ListenSocketBase
SocketThread::SocketThread(InspIRCd* SI)
{
- ThreadSignalListener* listener = new ThreadSignalListener(this, ServerInstance, 0, "127.0.0.1");
+ ThreadSignalListener* listener = new ThreadSignalListener(this, SI, 0, "127.0.0.1");
if (listener->GetFd() == -1)
throw CoreException("Could not create ITC pipe");
int connFD = socket(AF_INET, SOCK_STREAM, 0);
@@ -118,10 +117,10 @@ SocketThread::SocketThread(InspIRCd* SI)
addr.sin_family = AF_INET;
addr.sin_port = htons(listener->GetPort());
- if (connect(connFD, static_cast<struct sockaddr*>(&addr), sizeof(addr)) == -1)
+ if (connect(connFD, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) == -1)
{
- ServerInstance->SE->DelFd(listener);
- close(connFD);
+ SI->SE->DelFd(listener);
+ closesocket(connFD);
throw CoreException("Could not connet to ITC pipe");
}
this->signal.connFD = connFD;
@@ -138,6 +137,6 @@ SocketThread::~SocketThread()
if (signal.connFD >= 0)
{
shutdown(signal.connFD, 2);
- close(signal.connFD);
+ closesocket(signal.connFD);
}
}