summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-03 21:43:10 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-03 21:43:10 +0000
commit56c1f7d40a3b1625893c8b0406ec709926f44b1c (patch)
tree42e27adb7a848369eb498249f15f4ae628d7c514
parent29a569fa74177f1cf7d9a2597a46f78e88da97fe (diff)
Delink servers using an SSL module that is being reloaded
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12367 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspsocket.cpp1
-rw-r--r--src/modules/m_spanningtree/main.cpp14
2 files changed, 14 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 1fbe3b5ab..f06ddf28d 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -131,6 +131,7 @@ void StreamSocket::Close()
ServerInstance->Logs->Log("SOCKET", DEFAULT,"%s threw an exception: %s",
modexcept.GetSource(), modexcept.GetReason());
}
+ IOHook = NULL;
}
ServerInstance->SE->Shutdown(this, 2);
ServerInstance->SE->DelFd(this);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 7ac67221b..9026d9d02 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -188,7 +188,6 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime)
{
sock->SendError("Ping timeout");
sock->Squit(s,"Ping timeout");
- ServerInstance->SE->DelFd(sock);
sock->Close();
return;
}
@@ -750,6 +749,19 @@ void ModuleSpanningTree::OnLoadModule(Module* mod)
void ModuleSpanningTree::OnUnloadModule(Module* mod)
{
// TODO notify other servers?
+
+ unsigned int items = Utils->TreeRoot->ChildCount();
+ for(unsigned int x = 0; x < items; x++)
+ {
+ TreeServer* srv = Utils->TreeRoot->GetChild(x);
+ TreeSocket* sock = srv->GetSocket();
+ if (sock && sock->GetIOHook() == mod)
+ {
+ sock->SendError("SSL module unloaded");
+ sock->Squit(srv,"SSL module unloaded");
+ sock->Close();
+ }
+ }
}
void ModuleSpanningTree::RedoConfig(Module* mod)