From fa16e59314dda5ddb70959a595deb92642821c97 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Feb 2007 18:04:14 +0000 Subject: When brain adds code into a constructor to fix a destructor crash, make sure brain adds code to all three constructors, not just one. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6519 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 06e4d1ec1..c5ff24c87 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -28,6 +28,7 @@ bool InspSocket::Readable() InspSocket::InspSocket(InspIRCd* SI) { + this->Timeout = NULL; this->state = I_DISCONNECTED; this->fd = -1; this->WaitingForWriteEvent = false; @@ -37,6 +38,7 @@ InspSocket::InspSocket(InspIRCd* SI) InspSocket::InspSocket(InspIRCd* SI, int newfd, const char* ip) { + this->Timeout = NULL; this->fd = newfd; this->state = I_CONNECTED; strlcpy(this->IP,ip,MAXBUF); @@ -589,6 +591,7 @@ bool InspSocket::Poll() break; case I_LISTENING: { + Instance->Log(DEBUG,"InspSocket listen event"); sockaddr* client = new sockaddr[2]; length = sizeof (sockaddr_in); std::string recvip; @@ -598,6 +601,8 @@ bool InspSocket::Poll() #endif incoming = accept (this->fd, client, &length); + Instance->Log(DEBUG,"Accepted socket, sockaddr length %d fd %d", length, incoming); + #ifdef IPV6 if ((!*this->host) || strchr(this->host, ':')) { @@ -611,6 +616,7 @@ bool InspSocket::Poll() #else recvip = inet_ntoa(((sockaddr_in*)client)->sin_addr); #endif + Instance->Log(DEBUG,"Call OnIncomingConnection, recvip=%s", recvip.c_str()); this->OnIncomingConnection(incoming, (char*)recvip.c_str()); if (this->IsIOHooked) -- cgit v1.2.3