diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-28 13:01:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-28 13:01:19 +0000 |
commit | 104cf9cbee8ae0c6994060b565fe410e8f140ed7 (patch) | |
tree | 601834883d8cb4707820164de7fcceb9cf4f51c5 /src/modules | |
parent | fe3799248f7d4cf50b1ba704615d5952dede8917 (diff) |
Note: connect() cant time out for inspsockets in this commit. They'll sit in memory forever -- if you want something actually working properly wait for the next commit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5040 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_ident.cpp | 24 | ||||
-rw-r--r-- | src/modules/m_spanningtree.cpp | 7 |
4 files changed, 4 insertions, 38 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index db68e17cd..8b6efb2c6 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -679,7 +679,7 @@ class Notifier : public InspSocket { Instance->Log(DEBUG,"Inbound connection on fd %d!",newsock); Notifier* n = new Notifier(this->Instance, newsock, ip); - this->Instance->AddSocket(n); + n = n; /* Stop bitching at me, GCC */ return true; } @@ -779,7 +779,6 @@ class ModuleSQL : public Module SQLModule = this; MessagePipe = new Notifier(ServerInstance); - ServerInstance->AddSocket(MessagePipe); ServerInstance->Log(DEBUG,"Bound notifier to 127.0.0.1:%d",MessagePipe->GetPort()); pthread_attr_t attribs; diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index feddae001..b1dc7b610 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -65,7 +65,7 @@ class HttpSocket : public InspSocket if (InternalState == HTTP_LISTEN) { HttpSocket* s = new HttpSocket(this->Instance, newsock, ip, index); - this->Instance->AddSocket(s); + s = s; /* Stop GCC whining */ } return true; } @@ -283,10 +283,6 @@ class ModuleHttp : public Module void CreateListener() { http = new HttpSocket(ServerInstance, this->bindip, this->port, true, 0, index); - if ((http) && (http->GetState() == I_LISTENING)) - { - ServerInstance->AddSocket(http); - } } ModuleHttp(InspIRCd* Me) : Module::Module(Me) @@ -317,7 +313,7 @@ class ModuleHttp : public Module virtual ~ModuleHttp() { - ServerInstance->DelSocket(http); + ServerInstance->SE->DelFd(http); } virtual Version GetVersion() diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index eab8f537a..669e9edbe 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -212,16 +212,7 @@ class ModuleIdent : public Module */ user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Looking up your ident..."); RFC1413* ident = new RFC1413(ServerInstance, user, IdentTimeout); - if (ident->GetState() != I_ERROR) - { - user->Extend("ident_data", (char*)ident); - ServerInstance->AddSocket(ident); - } - else - { - user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Could not find your ident, using "+std::string(user->ident)+" instead."); - DELETE(ident); - } + user->Extend("ident_data", (char*)ident); } virtual bool OnCheckReady(userrec* user) @@ -232,17 +223,6 @@ class ModuleIdent : public Module * have an ident field any more. */ RFC1413* ident; - if (user->GetExt("ident_data", ident)) - { - /*ServerInstance->Log(DEBUG,"TIMES: %lu %lu",ident->timeout_end, ServerInstance->Time());*/ - if (ServerInstance->Time() > ident->timeout_end) - { - ident->u = NULL; - ServerInstance->RemoveSocket(ident); - user->Shrink("ident_data"); - return true; - } - } return (!user->GetExt("ident_data", ident)); } @@ -259,7 +239,6 @@ class ModuleIdent : public Module // a user which has now vanished! To prevent this, set ident::u // to NULL and check it so that we dont write users who have gone away. ident->u = NULL; - ServerInstance->RemoveSocket(ident); } } } @@ -278,7 +257,6 @@ class ModuleIdent : public Module if (user->GetExt("ident_data", ident)) { ident->u = NULL; - ServerInstance->RemoveSocket(ident); } } diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index cceaeb70d..4db91a578 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3021,7 +3021,6 @@ class TreeSocket : public InspSocket } } TreeSocket* s = new TreeSocket(this->Instance, newsock, ip); - this->Instance->AddSocket(s); return true; } }; @@ -3059,7 +3058,6 @@ class ServernameResolver : public Resolver if (newsocket->GetFd() > -1) { /* We're all OK */ - ServerInstance->AddSocket(newsocket); } else { @@ -3306,7 +3304,6 @@ void ReadConfiguration(bool rebind) TreeSocket* listener = new TreeSocket(ServerInstance, IP.c_str(),Port,true,10); if (listener->GetState() == I_LISTENING) { - ServerInstance->AddSocket(listener); Bindings.push_back(listener); } else @@ -3645,7 +3642,6 @@ class ModuleSpanningTree : public Module ServerInstance->Log(DEBUG,"Splitting server %s",s->GetName().c_str()); ServerInstance->WriteOpers("*** SQUIT: Server \002%s\002 removed from network by %s",parameters[0],user->nick); sock->Squit(s,"Server quit by "+std::string(user->nick)+"!"+std::string(user->ident)+"@"+std::string(user->host)); - ServerInstance->RemoveSocket(sock); } else { @@ -3725,7 +3721,6 @@ class ModuleSpanningTree : public Module // they didnt answer, boot them ServerInstance->WriteOpers("*** Server \002%s\002 pinged out",serv->GetName().c_str()); sock->Squit(serv,"Ping timeout"); - ServerInstance->RemoveSocket(sock); return; } } @@ -3755,7 +3750,6 @@ class ModuleSpanningTree : public Module TreeSocket* newsocket = new TreeSocket(ServerInstance, x->IPAddr,x->Port,false,10,x->Name.c_str()); if (newsocket->GetFd() > -1) { - ServerInstance->AddSocket(newsocket); } else { @@ -3836,7 +3830,6 @@ class ModuleSpanningTree : public Module TreeSocket* newsocket = new TreeSocket(ServerInstance,x->IPAddr,x->Port,false,10,x->Name.c_str()); if (newsocket->GetFd() > -1) { - ServerInstance->AddSocket(newsocket); } else { |