diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:53:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:53:19 +0000 |
commit | ab46b96db4d457e6a4f2e978c38b79762cdeb9d5 (patch) | |
tree | 01b9489ae9804ee45b765ad7045efee54b34347b /src/modules/m_spanningtree.cpp | |
parent | f0680338833dd76966ba1769980abb9eafb50467 (diff) |
Move socket_ref and module_sockets vectors/arrays into InspIRCd*. These are public members, which InspSocket can modify.
(eventually, this will be marshalled safely through some accessors). When constructing an InspSocket you must now provide
an InspIRCd* instance to 'attach' the socket to.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4812 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 7d011970e..448e3470b 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -663,8 +663,8 @@ class TreeSocket : public InspSocket * most of the action, and append a few of our own values * to it. */ - TreeSocket(std::string host, int port, bool listening, unsigned long maxtime) - : InspSocket(host, port, listening, maxtime) + TreeSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime) + : InspSocket(SI, host, port, listening, maxtime) { myhost = host; this->LinkState = LISTENER; @@ -672,8 +672,8 @@ class TreeSocket : public InspSocket this->ctx_out = NULL; } - TreeSocket(std::string host, int port, bool listening, unsigned long maxtime, std::string ServerName) - : InspSocket(host, port, listening, maxtime) + TreeSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, std::string ServerName) + : InspSocket(SI, host, port, listening, maxtime) { myhost = ServerName; this->LinkState = CONNECTING; @@ -685,8 +685,8 @@ class TreeSocket : public InspSocket * we must associate it with a socket without creating a new * connection. This constructor is used for this purpose. */ - TreeSocket(int newfd, char* ip) - : InspSocket(newfd, ip) + TreeSocket(InspIRCd* SI, int newfd, char* ip) + : InspSocket(SI, newfd, ip) { this->LinkState = WAIT_AUTH_1; this->ctx_in = NULL; @@ -3069,7 +3069,7 @@ class TreeSocket : public InspSocket return false; } } - TreeSocket* s = new TreeSocket(newsock, ip); + TreeSocket* s = new TreeSocket(this->Instance, newsock, ip); Srv->AddSocket(s); return true; } @@ -3104,7 +3104,7 @@ class ServernameResolver : public Resolver TreeServer* CheckDupe = FindServer(MyLink.Name.c_str()); if (!CheckDupe) /* Check that nobody tried to connect it successfully while we were resolving */ { - TreeSocket* newsocket = new TreeSocket(result,MyLink.Port,false,10,MyLink.Name.c_str()); + TreeSocket* newsocket = new TreeSocket(ServerInstance, result,MyLink.Port,false,10,MyLink.Name.c_str()); if (newsocket->GetFd() > -1) { /* We're all OK */ @@ -3334,7 +3334,7 @@ void ReadConfiguration(bool rebind) { IP = ""; } - TreeSocket* listener = new TreeSocket(IP.c_str(),Port,true,10); + TreeSocket* listener = new TreeSocket(ServerInstance, IP.c_str(),Port,true,10); if (listener->GetState() == I_LISTENING) { Srv->AddSocket(listener); @@ -3781,7 +3781,7 @@ class ModuleSpanningTree : public Module /* Do we already have an IP? If so, no need to resolve it. */ if (insp_aton(x->IPAddr.c_str(), &binip) > 0) { - TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name.c_str()); + TreeSocket* newsocket = new TreeSocket(ServerInstance, x->IPAddr,x->Port,false,10,x->Name.c_str()); if (newsocket->GetFd() > -1) { Srv->AddSocket(newsocket); @@ -3862,7 +3862,7 @@ class ModuleSpanningTree : public Module /* Do we already have an IP? If so, no need to resolve it. */ if (insp_aton(x->IPAddr.c_str(), &binip) > 0) { - TreeSocket* newsocket = new TreeSocket(x->IPAddr,x->Port,false,10,x->Name.c_str()); + TreeSocket* newsocket = new TreeSocket(ServerInstance,x->IPAddr,x->Port,false,10,x->Name.c_str()); if (newsocket->GetFd() > -1) { Srv->AddSocket(newsocket); |