From ff8065ed32009b40217d9db228e3724f6fa1c060 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 15 Jan 2012 13:11:56 +0700 Subject: [PATCH] TDNS: Fix few incompabilities with last Csocket. --- include/znc/Csocket.h | 8 -------- include/znc/IRCSock.h | 1 - src/IRCSock.cpp | 5 ----- src/Socket.cpp | 2 +- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/znc/Csocket.h b/include/znc/Csocket.h index 3121d85f..c5ea37e7 100644 --- a/include/znc/Csocket.h +++ b/include/znc/Csocket.h @@ -910,14 +910,6 @@ public: * Don't bother using these callbacks if you are using this class directly (without Socket Manager) * as the Socket Manager calls most of these callbacks * - * A sock error occured event - */ - virtual void SockTextError( const CS_STRING & sError ) { SockError(-1); } - /** - * Override these functions for an easy interface when using the Socket Manager - * Don't bother using these callbacks if you are using this class directly (without Socket Manager) - * as the Socket Manager calls most of these callbacks - * * * Incoming Connection Event * return false and the connection will fail diff --git a/include/znc/IRCSock.h b/include/znc/IRCSock.h index b69550b2..26a79e4e 100644 --- a/include/znc/IRCSock.h +++ b/include/znc/IRCSock.h @@ -50,7 +50,6 @@ public: virtual void Disconnected(); virtual void ConnectionRefused(); virtual void SockError(int iErrno); - virtual void SockTextError(const CString& sError); virtual void Timeout(); virtual void ReachedMaxBuffer(); diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp index aa55b77e..7534f488 100644 --- a/src/IRCSock.cpp +++ b/src/IRCSock.cpp @@ -972,11 +972,6 @@ void CIRCSock::SockError(int iErrno) { DEBUG(GetSockName() << " == SockError(" << iErrno << " " << sError << ")"); - SockTextError(sError); -} - -void CIRCSock::SockTextError(const CString& sError) { - DEBUG(GetSockName() << " == SockError(" << sError << ")"); if (!m_pNetwork->GetUser()->IsBeingDeleted()) { if (GetConState() != CST_OK) { m_pNetwork->PutStatus("Cannot connect to IRC (" + sError + "). Retrying..."); diff --git a/src/Socket.cpp b/src/Socket.cpp index dc449b4c..926c248b 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -196,7 +196,7 @@ void CSockManager::TryToFinishTDNSTask(TDNSTask* task) { } catch (const char* s) { DEBUG(task->sSockName << ", dns resolving error: " << s); task->pcSock->SetSockName(task->sSockName); - task->pcSock->SockTextError(s); + task->pcSock->SockError(-1, s); delete task->pcSock; }