diff options
author | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
commit | 26b5e033ffde3d161382fc9addbfa99738379641 (patch) | |
tree | a344f369ca32945f787a02dee35c3dbe342bed7e /dep/src/sockets/ResolvSocket.cpp | |
parent | f21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff) |
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget
--HG--
branch : trunk
Diffstat (limited to 'dep/src/sockets/ResolvSocket.cpp')
-rw-r--r-- | dep/src/sockets/ResolvSocket.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/dep/src/sockets/ResolvSocket.cpp b/dep/src/sockets/ResolvSocket.cpp index 236e93f9704..f97be03cd06 100644 --- a/dep/src/sockets/ResolvSocket.cpp +++ b/dep/src/sockets/ResolvSocket.cpp @@ -4,25 +4,20 @@ **/ /* Copyright (C) 2004-2007 Anders Hedstrom - This library is made available under the terms of the GNU GPL. - If you would like to use this library in a closed-source application, a separate license agreement is available. For information about the closed-source license agreement for the C++ sockets library, please visit http://www.alhem.net/Sockets/license.html and/or email license@alhem.net. - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -42,24 +37,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ISocketHandler.h" #include "Lock.h" #include "Mutex.h" - #ifdef SOCKETS_NAMESPACE namespace SOCKETS_NAMESPACE { #endif - //#ifdef _DEBUG //#define DEB(x) x //#else #define DEB(x) //#endif - // static ResolvSocket::cache_t ResolvSocket::m_cache; ResolvSocket::timeout_t ResolvSocket::m_cache_to; Mutex ResolvSocket::m_cache_mutex; - ResolvSocket::ResolvSocket(ISocketHandler& h) :TcpSocket(h) ,m_bServer(false) @@ -72,7 +63,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h) SetLineProtocol(); } - ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, const std::string& host, port_t port, bool ipv6) :TcpSocket(h) ,m_bServer(false) @@ -87,7 +77,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, const std::string& SetLineProtocol(); } - ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, ipaddr_t a) :TcpSocket(h) ,m_bServer(false) @@ -102,7 +91,6 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, ipaddr_t a) SetLineProtocol(); } - #ifdef ENABLE_IPV6 ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, in6_addr& a) :TcpSocket(h) @@ -117,12 +105,10 @@ ResolvSocket::ResolvSocket(ISocketHandler& h, Socket *parent, in6_addr& a) } #endif - ResolvSocket::~ResolvSocket() { } - void ResolvSocket::OnLine(const std::string& line) { Parse pa(line, ":"); @@ -184,7 +170,6 @@ DEB(fprintf(stderr, " *** Returning cache for [%s][%s] = '%s'\n", m_query.c_str( std::string key = pa.getword(); std::string value = pa.getrest(); DEB( fprintf(stderr, " *** ResolvSocket response; %s: %s\n", key.c_str(), value.c_str());) - if (key == "Cached") { m_cached = true; @@ -268,7 +253,6 @@ DEB(fprintf(stderr, " *** Update cache for [%s][%s] = '%s'\n", m_query.c_str(), #endif } - void ResolvSocket::OnDetached() { DEB( fprintf(stderr, " *** ResolvSocket::OnDetached(); query=%s, data=%s\n", m_query.c_str(), m_data.c_str());) @@ -370,7 +354,6 @@ DEB( fprintf(stderr, " *** ResolvSocket::OnDetached(); query=%s, data=%s\n", SetCloseAndDelete(); } - void ResolvSocket::OnConnect() { if (!m_resolv_host.empty()) @@ -405,7 +388,6 @@ void ResolvSocket::OnConnect() Send( msg ); } - void ResolvSocket::OnDelete() { if (m_parent) @@ -427,11 +409,8 @@ DEB(fprintf(stderr, " *** Update cache for [%s][%s] = '%s'\n", m_query.c_str(), } } - #ifdef SOCKETS_NAMESPACE } #endif - #endif // ENABLE_RESOLVER - |