From: brain Date: Thu, 22 Dec 2005 13:25:03 +0000 (+0000) Subject: Fixed encryption being set on a connection that has only just begun! X-Git-Tag: v2.0.23~9438 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=11e0cbf4dd4356c2791ab04fcec76b58bd44567e;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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 == "")