From 79cae85dd75d2b291c6964572cacfa047a16d3c6 Mon Sep 17 00:00:00 2001 From: peavey Date: Sat, 4 Aug 2007 03:07:31 +0000 Subject: Remove debug again. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7649 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ssl_openssl.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 2f36d20ee..e4b56d645 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -421,7 +421,6 @@ class ModuleSSLOpenSSL : public Module virtual void OnRawSocketConnect(int fd) { - ServerInstance->Log(DEBUG,"OnRawSocketConnect connecting"); issl_session* session = &sessions[fd]; session->fd = fd; @@ -441,7 +440,6 @@ class ModuleSSLOpenSSL : public Module } Handshake(session); - ServerInstance->Log(DEBUG,"Exiting OnRawSocketConnect"); } virtual void OnRawSocketClose(int fd) @@ -463,11 +461,8 @@ class ModuleSSLOpenSSL : public Module { issl_session* session = &sessions[fd]; - ServerInstance->Log(DEBUG,"OnRawSocketRead"); - if (!session->sess) { - ServerInstance->Log(DEBUG,"OnRawSocketRead has no session"); readresult = 0; CloseSession(session); return 1; @@ -477,11 +472,9 @@ class ModuleSSLOpenSSL : public Module { if (session->rstat == ISSL_READ || session->wstat == ISSL_READ) { - ServerInstance->Log(DEBUG,"Resume handshake in read"); // The handshake isn't finished and it wants to read, try to finish it. if (!Handshake(session)) { - ServerInstance->Log(DEBUG,"Cant resume handshake in read"); // Couldn't resume handshake. return -1; } @@ -547,7 +540,6 @@ class ModuleSSLOpenSSL : public Module if (!session->sess) { - ServerInstance->Log(DEBUG,"Close session missing sess"); CloseSession(session); return -1; } @@ -559,7 +551,6 @@ class ModuleSSLOpenSSL : public Module // The handshake isn't finished, try to finish it. if (session->rstat == ISSL_WRITE || session->wstat == ISSL_WRITE) { - ServerInstance->Log(DEBUG,"Handshake resume"); Handshake(session); } } @@ -568,13 +559,11 @@ class ModuleSSLOpenSSL : public Module { if (session->rstat == ISSL_WRITE) { - ServerInstance->Log(DEBUG,"DoRead"); DoRead(session); } if (session->wstat == ISSL_WRITE) { - ServerInstance->Log(DEBUG,"DoWrite"); return DoWrite(session); } } @@ -591,7 +580,6 @@ class ModuleSSLOpenSSL : public Module if (ret == 0) { - ServerInstance->Log(DEBUG,"Oops, got 0 from SSL_write"); CloseSession(session); return 0; } @@ -612,7 +600,6 @@ class ModuleSSLOpenSSL : public Module } else { - ServerInstance->Log(DEBUG,"Close due to returned -1 in SSL_Write"); CloseSession(session); return 0; } @@ -629,14 +616,11 @@ class ModuleSSLOpenSSL : public Module // Is this right? Not sure if the unencrypted data is garaunteed to be the same length. // Read into the inbuffer, offset from the beginning by the amount of data we have that insp hasn't taken yet. - ServerInstance->Log(DEBUG,"DoRead"); - int ret = SSL_read(session->sess, session->inbuf + session->inbufoffset, inbufsize - session->inbufoffset); if (ret == 0) { // Client closed connection. - ServerInstance->Log(DEBUG,"Oops, got 0 from SSL_read"); CloseSession(session); return 0; } @@ -647,19 +631,16 @@ class ModuleSSLOpenSSL : public Module if (err == SSL_ERROR_WANT_READ) { session->rstat = ISSL_READ; - ServerInstance->Log(DEBUG,"Setting want_read"); return -1; } else if (err == SSL_ERROR_WANT_WRITE) { session->rstat = ISSL_WRITE; MakePollWrite(session); - ServerInstance->Log(DEBUG,"Setting want_write"); return -1; } else { - ServerInstance->Log(DEBUG,"Closed due to returned -1 in SSL_Read"); CloseSession(session); return 0; } @@ -720,12 +701,10 @@ class ModuleSSLOpenSSL : public Module bool Handshake(issl_session* session) { - ServerInstance->Log(DEBUG,"Handshake"); int ret; if (session->outbound) { - ServerInstance->Log(DEBUG,"SSL_connect"); ret = SSL_connect(session->sess); } else @@ -737,14 +716,12 @@ class ModuleSSLOpenSSL : public Module if (err == SSL_ERROR_WANT_READ) { - ServerInstance->Log(DEBUG,"Want read, handshaking"); session->rstat = ISSL_READ; session->status = ISSL_HANDSHAKING; return true; } else if (err == SSL_ERROR_WANT_WRITE) { - ServerInstance->Log(DEBUG,"Want write, handshaking"); session->wstat = ISSL_WRITE; session->status = ISSL_HANDSHAKING; MakePollWrite(session); @@ -752,7 +729,6 @@ class ModuleSSLOpenSSL : public Module } else { - ServerInstance->Log(DEBUG,"Handshake failed"); CloseSession(session); } -- cgit v1.2.3