]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
When brain adds code into a constructor to fix a destructor crash, make sure brain...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 6 Feb 2007 18:04:14 +0000 (18:04 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 6 Feb 2007 18:04:14 +0000 (18:04 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6519 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspsocket.cpp

index 06e4d1ec1ed74a0f8c0de45909c6ceb355c498cc..c5ff24c874ac2ebc4607b6cc84f1f4034e925f33 100644 (file)
@@ -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)