summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 23:48:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-08 23:48:19 +0000
commita0c075802c39bd70ef3aca8b0f56be0a1a4057a4 (patch)
tree400b9cd2bdfc668c9f4b9ca4e110281dc12bf3ac /src
parentb3ffc4752f70546b8211d5d0f1b31f7b46906eab (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp7
1 files changed, 5 insertions, 2 deletions
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;