/* This lookup_host cannot fail, because it has the results in the
cache. */
- pc_last_host_ip = lookup_host (host, 1);
+ pc_last_host_ip = lookup_host (host, LH_SILENT);
assert (pc_last_host_ip != NULL);
pc_last_port = port;
return 0;
#endif /* HAVE_SSL */
- this_host_ip = lookup_host (host, 1);
+ this_host_ip = lookup_host (host, LH_SILENT);
if (!this_host_ip)
return 0;
#endif /* HAVE_SSL */
)
{
- struct address_list *al = lookup_host (conn->host, 0);
- if (!al)
+ sock = connect_to_host (conn->host, conn->port);
+ if (sock == E_HOST)
return HOSTERR;
- set_connection_host_name (conn->host);
- sock = connect_to_many (al, conn->port, 0);
- set_connection_host_name (NULL);
- address_list_release (al);
-
- if (sock < 0)
+ else if (sock < 0)
return CONNECT_ERROR (errno);
#ifdef HAVE_SSL
{
char* last_period_in_local_filename = strrchr(*hs->local_file, '.');
- if (last_period_in_local_filename == NULL ||
- !(strcasecmp(last_period_in_local_filename, ".htm") == EQ ||
- strcasecmp(last_period_in_local_filename, ".html") == EQ))
+ if (last_period_in_local_filename == NULL
+ || !(0 == strcasecmp (last_period_in_local_filename, ".htm")
+ || 0 == strcasecmp (last_period_in_local_filename, ".html")))
{
size_t local_filename_len = strlen(*hs->local_file);
printwhat (count, opt.ntry);
continue;
break;
- case HOSTERR: case CONREFUSED: case PROXERR: case AUTHFAILED:
+ case HOSTERR: case CONIMPOSSIBLE: case PROXERR: case AUTHFAILED:
case SSLERRCTXCREATE: case CONTNOTSUPPORTED:
/* Fatal errors just return from the function. */
free_hstat (&hstat);