From 11e0cbf4dd4356c2791ab04fcec76b58bd44567e Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 22 Dec 2005 13:25:03 +0000 Subject: Fixed encryption being set on a connection that has only just begun! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2636 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 57872b65d..8a4599565 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -552,6 +552,7 @@ class TreeSocket : public InspSocket { myhost = host; this->LinkState = LISTENER; + this->ctx = NULL; } TreeSocket(std::string host, int port, bool listening, unsigned long maxtime, std::string ServerName) @@ -559,6 +560,7 @@ class TreeSocket : public InspSocket { myhost = ServerName; this->LinkState = CONNECTING; + this->ctx = NULL; } /* When a listening socket gives us a new file descriptor, @@ -569,9 +571,16 @@ class TreeSocket : public InspSocket : InspSocket(newfd, ip) { this->LinkState = WAIT_AUTH_1; + this->ctx = NULL; this->SendCapabilities(); } + ~TreeSocket() + { + if (ctx) + delete ctx; + } + void InitAES(std::string key,std::string SName) { if (key == "") -- cgit v1.2.3