DEBUG(D_host_lookup)
debug_printf("using host_fake_gethostbyname for %s (%s)\n", name,
- (af == AF_INET)? "IPv4" : "IPv6");
+ af == AF_INET ? "IPv4" : "IPv6");
/* Handle unqualified "localhost" */
if (Ustrcmp(name, "localhost") == 0)
- lname = (af == AF_INET)? US"127.0.0.1" : US"::1";
+ lname = af == AF_INET ? US"127.0.0.1" : US"::1";
/* Handle a literal IP address */
if ((ipa = string_is_ip_address(lname, NULL)) != 0)
- {
- if ((ipa == 4 && af == AF_INET) ||
- (ipa == 6 && af == AF_INET6))
+ if ( ipa == 4 && af == AF_INET
+ || ipa == 6 && af == AF_INET6)
{
int x[4];
yield = store_get(sizeof(struct hostent), FALSE);
*error_num = HOST_NOT_FOUND;
return NULL;
}
- }
/* Handle a host name */
else
{
- int type = (af == AF_INET)? T_A:T_AAAA;
+ int type = af == AF_INET ? T_A:T_AAAA;
int rc = dns_lookup_timerwrap(dnsa, lname, type, NULL);
int count = 0;
&& (time_msec = get_time_in_ms() - time_msec) > slow_lookup_log)
log_long_lookup(US"gethostbyname", host->name, time_msec);
- if (hostdata == NULL)
+ if (!hostdata)
{
uschar *error;
switch (error_num)
case TRY_AGAIN: error = US"TRY_AGAIN"; break;
case NO_RECOVERY: error = US"NO_RECOVERY"; break;
case NO_DATA: error = US"NO_DATA"; break;
- #if NO_DATA != NO_ADDRESS
+ #if NO_DATA != NO_ADDRESS
case NO_ADDRESS: error = US"NO_ADDRESS"; break;
- #endif
+ #endif
default: error = US"?"; break;
}
DEBUG(D_host_lookup) debug_printf("%s returned %d (%s)\n",
+ f.running_in_test_harness ? "host_fake_gethostbyname" :
#if HAVE_IPV6
#if HAVE_GETIPNODEBYNAME
- (af == AF_INET6)? "getipnodebyname(af=inet6)" : "getipnodebyname(af=inet)",
+ af == AF_INET6 ? "getipnodebyname(af=inet6)" : "getipnodebyname(af=inet)",
#else
- (af == AF_INET6)? "gethostbyname2(af=inet6)" : "gethostbyname2(af=inet)",
+ af == AF_INET6 ? "gethostbyname2(af=inet6)" : "gethostbyname2(af=inet)",
#endif
#else
"gethostbyname",
set transport smtp
finding IP address for 127.0.0.1
calling host_find_byname
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
fully qualified name = 127.0.0.1
remote host address is the local host: y: configured to try delivery anyway
finding IP address for V4NET.0.0.0
calling host_find_byname
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for V4NET.0.0.0 (IPv4)
fully qualified name = V4NET.0.0.0
MUNGED: ::1 will be omitted in what follows
set transport t2
finding IP address for 127.0.0.1
calling host_find_byname
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
fully qualified name = 127.0.0.1
expanded list of hosts = '127.0.0.1' options = ''
finding IP address for 127.0.0.1
calling host_find_byname
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
fully qualified name = 127.0.0.1
expanded list of hosts = '127.0.0.1' options = ''
finding IP address for 127.0.0.1
calling host_find_byname
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
fully qualified name = 127.0.0.1
routed by r1 router
envelope to: x@y
transport: t1
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
MUNGED: ::1 will be omitted in what follows
routed by r1 router
envelope to: x@y
transport: t1
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
using host_fake_gethostbyname for 127.0.0.1 (IPv4)
local host found for non-MX address
MUNGED: ::1 will be omitted in what follows
cioce.test.again.dns is in dns_again_means_nonexist: returning DNS_NOMATCH
DNS: no SOA record found for neg-TTL
writing neg-cache entry for cioce.test.again.dns-A-xxxx, ttl -1
-get[host|ipnode]byname[2] returned 1 (HOST_NOT_FOUND)
+host_fake_gethostbyname returned 1 (HOST_NOT_FOUND)
no IP address found for host cioce.test.again.dns (during SMTP connection from the.local.host.name [ip4.ip4.ip4.ip4])
LOG: host_lookup_failed MAIN
no IP address found for host cioce.test.again.dns (during SMTP connection from the.local.host.name [ip4.ip4.ip4.ip4])