From 3a3a73bce3d83aaa07f250e507f831450581459a Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 1 Aug 2006 15:41:20 +0000 Subject: Fix broken inet_pton call git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4616 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 20cde3a1a..d6b836c4d 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -99,7 +99,7 @@ InspSocket::InspSocket(const std::string &ahost, int aport, bool listening, unsi strlcpy(this->host,ahost.c_str(),MAXBUF); this->port = aport; - if (insp_aton(host,&addy) < 0) + if (insp_aton(host,&addy) < 1) { log(DEBUG,"Attempting to resolve %s",this->host); /* Its not an ip, spawn the resolver */ @@ -200,7 +200,7 @@ bool InspSocket::BindAddr() insp_sockaddr s; char resolved_addr[MAXBUF]; - if (insp_aton(IP.c_str(),&n) < 0) + if (insp_aton(IP.c_str(),&n) < 1) { /* If they gave a hostname, bind to the IP it resolves to */ log(DEBUG,"Resolving host %s",IP.c_str()); @@ -211,7 +211,7 @@ bool InspSocket::BindAddr() } } - if (insp_aton(IP.c_str(),&n) == 0) + if (insp_aton(IP.c_str(),&n) > 0) { log(DEBUG,"Found an IP to bind to: %s",IP.c_str()); #ifdef IPV6 -- cgit v1.2.3