From a0c075802c39bd70ef3aca8b0f56be0a1a4057a4 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 8 Jun 2008 23:48:19 +0000 Subject: Properly ignore second STARTTLS request on same socket, as per our spec git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9878 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ssl_gnutls.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 91f29189e..c00aee57e 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -81,8 +81,11 @@ class CommandStartTLS : public Command } else { - user->io = Caller; - Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort()); + if (!user->io) + { + user->io = Caller; + Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort()); + } } return CMD_FAILURE; -- cgit v1.2.3