summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 18:04:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 18:04:14 +0000
commitfa16e59314dda5ddb70959a595deb92642821c97 (patch)
treecc606b5371140e2d7d4a4628ed1eb23c62678b79
parentbf4720abab7a7929b92238a36cb3b91393f1038c (diff)
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
-rw-r--r--src/inspsocket.cpp6
1 files changed, 6 insertions, 0 deletions
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)