From: brain Date: Tue, 6 Feb 2007 18:04:14 +0000 (+0000) Subject: When brain adds code into a constructor to fix a destructor crash, make sure brain... X-Git-Tag: v2.0.23~5870 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=fa16e59314dda5ddb70959a595deb92642821c97;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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)