X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fresolver.class.php;h=8f48213a18d830ebdc1b1a142d7485d6718a8b7b;hb=90a0f3d369ac0af39c0f10aa0282f14ed092a513;hp=57afe95342d8d9be749d9a8c65d5847161205bc2;hpb=56931cd9321119dd37372bd16d6c552857e40066;p=mailer.git diff --git a/inc/classes/resolver.class.php b/inc/classes/resolver.class.php index 57afe95342..8f48213a18 100644 --- a/inc/classes/resolver.class.php +++ b/inc/classes/resolver.class.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * 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 * @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { class HostnameResolver { // Resolve hostname -> IP address function resolveHostname ($hostname) { - // If sql_patches is not at least 0.7.0, abort here and return the hostname (gethostbyname() may return something unwanted) + // If ext-sql_patches is not at least 0.7.0, abort here and return the hostname (gethostbyname() may return something unwanted) if (!isExtensionInstalledAndNewer('sql_patches', '0.7.0')) { // Abort here return $hostname; @@ -83,6 +83,7 @@ class HostnameResolver { } else { // Get IP address $ip = gethostbyname($hostname); + //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'ip=' . $ip . ',hostname=' . $hostname . ' - RESOLVED!'); // Count lookup hit incrementStatsEntry('dns_lookup_hits'); @@ -97,6 +98,7 @@ class HostnameResolver { // Set return value to $ip //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("IP detected, cache entry written: %s->%s", $hostname, $ip)); + $ret = $ip; } else { // Network address or broadcast address found //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, sprintf("IP %s is possibly a network or broadcast address.", $ip)); @@ -118,7 +120,7 @@ class HostnameResolver { // Free result SQL_FREERESULT($result); - // Return IP number (let's hope it! + // Return IP number (let's hope it) return $ret; }