summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
-rw-r--r--src/testsuite.cpp9
2 files changed, 4 insertions, 9 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 74aede15d..2e954632e 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -390,6 +390,10 @@ class ModuleSSLGnuTLS : public Module
issl_session* session = &sessions[fd];
+ /* For STARTTLS: Don't try and init a session on a socket that already has a session */
+ if (session->sess)
+ return;
+
session->fd = fd;
session->inbuf = new char[inbufsize];
session->inbufoffset = 0;
diff --git a/src/testsuite.cpp b/src/testsuite.cpp
index 71ace375e..1cee7500c 100644
--- a/src/testsuite.cpp
+++ b/src/testsuite.cpp
@@ -56,7 +56,6 @@ TestSuite::TestSuite(InspIRCd* Instance) : ServerInstance(Instance)
cout << "(3) Unload a module\n";
cout << "(4) Threading tests\n";
cout << "(5) Wildcard and CIDR tests\n";
- cout << "(6) irc::string -> std::string dynamic cast\n";
cout << endl << "(X) Exit test suite\n";
@@ -87,14 +86,6 @@ TestSuite::TestSuite(InspIRCd* Instance) : ServerInstance(Instance)
case '5':
cout << (DoWildTests() ? "\nSUCCESS!\n" : "\nFAILURE\n");
break;
- case '6':
- {
- std::string* a = new std::string("test");
- irc::string* b = (irc::string)a;
- cout << "std::string value: '" << *a << "' irc::string value: '" << *b << "'" << endl;
- delete a;
- }
- break;
case 'X':
return;
break;