From 9b2cb52a12bf17d23417e689a1c07765d3bdaed5 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 2 Mar 2010 03:23:18 +0000 Subject: Fix some more incorrect socket use git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12585 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 5 ----- src/modules/extra/m_pgsql.cpp | 12 +----------- src/modules/m_ident.cpp | 1 - src/modules/m_spanningtree/rsquit.cpp | 1 - 4 files changed, 1 insertion(+), 18 deletions(-) (limited to 'src') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index e3b8f8c8a..c20b76dd7 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -446,11 +446,6 @@ void SocketTimeout::Tick(time_t) // connection. this->sock->OnTimeout(); this->sock->OnError(I_ERR_TIMEOUT); - - /* NOTE: We must set this AFTER DelFd, as we added - * this socket whilst writeable. This means that we - * must DELETE the socket whilst writeable too! - */ this->sock->state = I_ERROR; ServerInstance->GlobalCulls.AddItem(sock); diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 629193ea1..b1f6916d0 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -735,17 +735,7 @@ class SQLConn : public EventHandler void Close() { - if (!ServerInstance->SE->DelFd(this)) - { - if (sql && PQstatus(sql) == CONNECTION_BAD) - { - ServerInstance->SE->DelFd(this, true); - } - else - { - ServerInstance->Logs->Log("m_pgsql",DEBUG, "BUG: PQsocket cant be removed from socket engine!"); - } - } + ServerInstance->SE->DelFd(this); if(sql) { diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index d20c9d8dd..2d810dde2 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -189,7 +189,6 @@ class IdentRequestSocket : public EventHandler ServerInstance->Logs->Log("m_ident",DEBUG,"Close ident socket %d", GetFd()); ServerInstance->SE->DelFd(this); ServerInstance->SE->Close(GetFd()); - ServerInstance->SE->Shutdown(GetFd(), SHUT_WR); this->SetFd(-1); } } diff --git a/src/modules/m_spanningtree/rsquit.cpp b/src/modules/m_spanningtree/rsquit.cpp index 39378c31d..d285520f9 100644 --- a/src/modules/m_spanningtree/rsquit.cpp +++ b/src/modules/m_spanningtree/rsquit.cpp @@ -57,7 +57,6 @@ CmdResult CommandRSQuit::Handle (const std::vector& parameters, Use const char *reason = parameters.size() == 2 ? parameters[1].c_str() : "No reason"; ServerInstance->SNO->WriteToSnoMask('l',"RSQUIT: Server \002%s\002 removed from network by %s (%s)", parameters[0].c_str(), user->nick.c_str(), reason); sock->Squit(server_target, std::string("Server quit by ") + user->GetFullRealHost() + " (" + reason + ")"); - ServerInstance->SE->DelFd(sock); sock->Close(); } } -- cgit v1.2.3