]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd.cpp
Make the build reproducible by removing time related macros.
[user/henk/code/inspircd.git] / src / modules / m_httpd.cpp
index 0b6b2e32b7dcd1c261cb8aa926c4b79b7fbfd2f0..35ae9abe5cecd8b7ba010e86a5e53e9e27919917 100644 (file)
@@ -76,10 +76,18 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru
                , postsize(0)
                , waitingcull(false)
        {
-               ServerInstance->Timers.AddTimer(this);
+               if ((!via->iohookprovs.empty()) && (via->iohookprovs.back()))
+               {
+                       via->iohookprovs.back()->OnAccept(this, client, server);
+                       // IOHook may have errored
+                       if (!getError().empty())
+                       {
+                               AddToCull();
+                               return;
+                       }
+               }
 
-               if (via->iohookprov)
-                       via->iohookprov->OnAccept(this, client, server);
+               ServerInstance->Timers.AddTimer(this);
        }
 
        ~HttpServerSocket()
@@ -216,7 +224,7 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru
                WriteData("\r\n");
        }
 
-       void OnDataReady()
+       void OnDataReady() CXX11_OVERRIDE
        {
                if (InternalState == HTTP_SERVE_RECV_POSTDATA)
                {
@@ -407,7 +415,7 @@ class ModuleHttpServer : public Module
                return MOD_RES_ALLOW;
        }
 
-       void OnUnloadModule(Module* mod)
+       void OnUnloadModule(Module* mod) CXX11_OVERRIDE
        {
                for (insp::intrusive_list<HttpServerSocket>::const_iterator i = sockets.begin(); i != sockets.end(); )
                {