rr = dns_next_rr(dnsa, &dnss, RESET_NEXT))
if (rr->type == T_TLSA && rr->size > 3)
{
rr = dns_next_rr(dnsa, &dnss, RESET_NEXT))
if (rr->type == T_TLSA && rr->size > 3)
{
{
shutdown(sx->cctx.sock, SHUT_WR);
if (fcntl(sx->cctx.sock, F_SETFL, O_NONBLOCK) == 0)
{
shutdown(sx->cctx.sock, SHUT_WR);
if (fcntl(sx->cctx.sock, F_SETFL, O_NONBLOCK) == 0)
- for (rc = 16; read(sx->cctx.sock, sx->inbuffer, sizeof(sx->inbuffer)) > 0 && rc > 0;)
- rc--; /* drain socket */
+ for (int i = 16; read(sx->cctx.sock, sx->inbuffer, sizeof(sx->inbuffer)) > 0 && i > 0;)
+ i--; /* drain socket */
if ((i = tls_write(ct_ctx, buf + nbytes, rc - nbytes, FALSE)) < 0)
goto done;
}
if ((i = tls_write(ct_ctx, buf + nbytes, rc - nbytes, FALSE)) < 0)
goto done;
}
if (sx.buffer[0] == '5' || addr->transport_return == OK)
addr->transport_return = PENDING_OK; /* allow set_errno action */
goto RESPONSE_FAILED;
if (sx.buffer[0] == '5' || addr->transport_return == OK)
addr->transport_return = PENDING_OK; /* allow set_errno action */
goto RESPONSE_FAILED;
and update the journal, or setup retry. */
overall_message = string_printing(sx.buffer);
and update the journal, or setup retry. */
overall_message = string_printing(sx.buffer);
if (addr->transport_return == OK)
addr->message = string_sprintf("%s\\n%s", addr->message, overall_message);
if (addr->transport_return == OK)
addr->message = string_sprintf("%s\\n%s", addr->message, overall_message);
if (addr->transport_return == OK)
{
if (testflag(addr, af_homonym))
if (addr->transport_return == OK)
{
if (testflag(addr, af_homonym))
shutdown(sx.cctx.sock, SHUT_WR);
millisleep(f.running_in_test_harness ? 200 : 20);
if (fcntl(sx.cctx.sock, F_SETFL, O_NONBLOCK) == 0)
shutdown(sx.cctx.sock, SHUT_WR);
millisleep(f.running_in_test_harness ? 200 : 20);
if (fcntl(sx.cctx.sock, F_SETFL, O_NONBLOCK) == 0)
- for (rc = 16; read(sx.cctx.sock, sx.inbuffer, sizeof(sx.inbuffer)) > 0 && rc > 0;)
- rc--; /* drain socket */
+ for (int i = 16; read(sx.cctx.sock, sx.inbuffer, sizeof(sx.inbuffer)) > 0 && i > 0;)
+ i--; /* drain socket */
prepare_addresses(address_item *addrlist, host_item *host)
{
address_item *first_addr = NULL;
prepare_addresses(address_item *addrlist, host_item *host)
{
address_item *first_addr = NULL;
transport_instance *tblock, /* data for this instantiation */
address_item *addrlist) /* addresses we are working on */
{
transport_instance *tblock, /* data for this instantiation */
address_item *addrlist) /* addresses we are working on */
{
debug_printf(" %s\n", addr->address);
if (hostlist)
{
debug_printf("hostlist:\n");
debug_printf(" %s\n", addr->address);
if (hostlist)
{
debug_printf("hostlist:\n");
debug_printf(" '%s' IP %s port %d\n", host->name, host->address, host->port);
}
if (continue_hostname)
debug_printf(" '%s' IP %s port %d\n", host->name, host->address, host->port);
}
if (continue_hostname)
/* Update the host (and any additional blocks, resulting from
multihoming) with a host-specific port, if any. */
/* Update the host (and any additional blocks, resulting from
multihoming) with a host-specific port, if any. */
/* Failure to find the host at this time (usually DNS temporary failure)
is really a kind of routing failure rather than a transport failure.
/* Failure to find the host at this time (usually DNS temporary failure)
is really a kind of routing failure rather than a transport failure.
"HOST_FIND_AGAIN" : "HOST_FIND_FAILED", host->name);
host->status = hstatus_unusable;
"HOST_FIND_AGAIN" : "HOST_FIND_FAILED", host->name);
host->status = hstatus_unusable;
&domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL) == OK))
{
expired = FALSE;
&domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL) == OK))
{
expired = FALSE;
if (addr->transport_return == DEFER)
addr->message = US"domain matches queue_smtp_domains, or -odqs set";
continue; /* With next host */
if (addr->transport_return == DEFER)
addr->message = US"domain matches queue_smtp_domains, or -odqs set";
continue; /* With next host */
set_errno_nohost(addrlist, 0, NULL, OK, FALSE);
set_errno_nohost(addrlist, 0, NULL, OK, FALSE);
{
debug_printf("*** delivery by %s transport bypassed by -N option\n"
"*** host and remaining hosts:\n", tblock->name);
{
debug_printf("*** delivery by %s transport bypassed by -N option\n"
"*** host and remaining hosts:\n", tblock->name);
debug_printf(" %s [%s]\n", host2->name,
host2->address ? host2->address : US"unset");
}
debug_printf(" %s [%s]\n", host2->name,
host2->address ? host2->address : US"unset");
}
down an existing TCP/IP connection, and something caused the host not to be
found, we end up here, but can detect these cases and handle them specially. */
down an existing TCP/IP connection, and something caused the host not to be
found, we end up here, but can detect these cases and handle them specially. */
{
/* If host is not NULL, it means that we stopped processing the host list
because of hosts_max_try or hosts_max_try_hardlimit. In the former case, this
{
/* If host is not NULL, it means that we stopped processing the host list
because of hosts_max_try or hosts_max_try_hardlimit. In the former case, this