diff --git a/IRCSock.cpp b/IRCSock.cpp index 6e8ca8fc..81e0ac2e 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -738,7 +738,7 @@ bool CIRCSock::OnPrivCTCP(CNick& Nick, CString& sMessage) { } } else if (sType.CaseCmp("RESUME") == 0) { // Need to lookup the connection by port, filter the port, and forward to the user - CDCCBounce* pSock = (CDCCBounce*) CZNC::Get().GetManager().FindSockByLocalPort(atoi(sMessage.Token(3).c_str())); + CDCCBounce* pSock = (CDCCBounce*) CZNC::Get().GetManager().FindSockByLocalPort(sMessage.Token(3).ToUShort()); if ((pSock) && (strncasecmp(pSock->GetSockName().c_str(), "DCC::", 5) == 0)) { m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001"); diff --git a/Utils.h b/Utils.h index d23f8d51..db04bd93 100644 --- a/Utils.h +++ b/Utils.h @@ -438,7 +438,7 @@ class CSafePtr : private CNoCopy { public: CSafePtr() { m_pType = new T; } CSafePtr(T* p) { m_pType = p; } - ~CSafePtr() { delete m_pType; } + virtual ~CSafePtr() { delete m_pType; } T& operator *() const { assert(m_pType); return *m_pType; } T* operator ->() const { assert(m_pType); return m_pType; } diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index e9a98abd..38069d0b 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -159,7 +159,7 @@ public: } if (!sPort.empty()) { - m_uPort = sPort.ToUInt(); + m_uPort = sPort.ToUShort(); } CWebAdminSock* pListenSock = new CWebAdminSock(this); @@ -213,7 +213,7 @@ public: } private: - unsigned int m_uPort; + unsigned short m_uPort; CString m_sSkinName; set m_spSocks; CString m_sListenHost;