aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorGravatar special2007-08-19 05:02:49 +0000
committerGravatar special2007-08-19 05:02:49 +0000
commitb35bb6155785f489a3da305d0fc98078711c7a2c (patch)
treef6e2ca307fef2097aada4c73c8f215144acb3766 /src/modules/m_httpd.cpp
parentbp: Added the <cloak:ipalways> and <cloak:lowercase> options. Patch by nenolod (diff)
bp: Fixed a crash within the timeout for m_httpd sockets
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@7741 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 631f89176..8daa2f5da 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -68,7 +68,8 @@ class HttpServerSocket : public InspSocket
std::string http_version;
unsigned int postsize;
HttpServerTimeout* Timeout;
-
+ friend class HttpServerTimeout;
+
public:
HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : InspSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0)
@@ -103,8 +104,7 @@ class HttpServerSocket : public InspSocket
{
if (InternalState == HTTP_LISTEN)
{
- HttpServerSocket* s = new HttpServerSocket(this->Instance, newsock, ip, index);
- s = s; /* Stop GCC whining */
+ new HttpServerSocket(this->Instance, newsock, ip, index);
}
return true;
}
@@ -344,6 +344,7 @@ void HttpServerTimeout::Tick(time_t TIME)
{
SE->DelFd(s);
s->Close();
+ s->Timeout = NULL;
}
class ModuleHttpServer : public Module