summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 21:30:30 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 21:30:30 +0000
commitbe2cf7a99fbf3c2fd1139608fe2b3cc5cdbd2daf (patch)
treeb290513fc07ba7e44dd268d0a07037be07e1aa5b /src/modules
parent184b6220255ec89c221bff152a62450f1a137340 (diff)
Move logging further up in inspsocket so we get the right error for bind failure
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4309 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_http.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_http.cpp b/src/modules/m_http.cpp
index 59293e7a9..6cb95fa55 100644
--- a/src/modules/m_http.cpp
+++ b/src/modules/m_http.cpp
@@ -20,6 +20,8 @@ using namespace std;
#include "users.h"
#include "channels.h"
#include "modules.h"
+#include "inspsocket.h"
+#include "helperfuncs.h"
/* $ModDesc: Provides HTTP serving facilities to modules */
@@ -42,6 +44,7 @@ class HttpSocket : public InspSocket
HttpSocket(std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : InspSocket(host, port, listening, maxtime), index(index_page)
{
+ log(DEBUG,"HttpSocket constructor");
InternalState = HTTP_LISTEN;
}
@@ -57,6 +60,7 @@ class HttpSocket : public InspSocket
HttpSocket* s = new HttpSocket(newsock, ip);
Srv->AddSocket(s);
}
+ return true;
}
virtual void OnClose()
@@ -78,6 +82,7 @@ class HttpSocket : public InspSocket
this->Write("<HTML><H1>COWS.</H1></HTML>");
}
}
+ return true;
}
};
@@ -107,7 +112,7 @@ class ModuleHttp : public Module
void CreateListener()
{
- http = new HttpSocket(this->host, this->port, true, 0, &index);
+ http = new HttpSocket(this->bindip, this->port, true, 0, &index);
Srv->AddSocket(http);
}