X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fip.c;h=fb42f005107e442e92545b6bc806c1ec26024c3e;hb=48519cef815997302bbb0f8c4499ecf4ae9ef446;hp=2a6a2492296f08401c47ba411fd9e7b3a4cc1a8b;hpb=068f180d1c1bc1349c5a786ea7af214b2b24dcc6;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/ip.c b/src/src/ip.c index 2a6a24922..fb42f0051 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -320,7 +320,7 @@ if (fastopen_blob && f.tcp_fastopen_ok) fastopen_blob->len > 0 ? "with" : "no"); if (!fastopen_blob->data) { - tcp_out_fastopen = TFO_ATTEMPTED; /* we tried; unknown if useful yet */ + tcp_out_fastopen = TFO_ATTEMPTED_NODATA; /* we tried; unknown if useful yet */ rc = 0; } else /* assume that no data was queued; block in send */ @@ -331,7 +331,10 @@ if (fastopen_blob && f.tcp_fastopen_ok) else #endif /*TCP_FASTOPEN*/ { +#if defined(TCP_FASTOPEN) && defined(MSG_FASTOPEN) legacy_connect: +#endif + DEBUG(D_transport|D_v) if (fastopen_blob) debug_printf("non-TFO mode connection attempt to %s, %lu data\n", address, (unsigned long)fastopen_blob->len); @@ -394,9 +397,8 @@ int ip_connectedsocket(int type, const uschar * hostname, int portlo, int porthi, int timeout, host_item * connhost, uschar ** errstr, const blob * fastopen_blob) { -int namelen, port; +int namelen; host_item shost; -host_item *h; int af = 0, fd, fd4 = -1, fd6 = -1; shost.next = NULL; @@ -440,7 +442,7 @@ else /* Try to connect to the server - test each IP till one works */ -for (h = &shost; h; h = h->next) +for (host_item * h = &shost; h; h = h->next) { fd = Ustrchr(h->address, ':') != 0 ? fd6 < 0 ? (fd6 = ip_socket(type, af = AF_INET6)) : fd6 @@ -452,7 +454,7 @@ for (h = &shost; h; h = h->next) goto bad; } - for(port = portlo; port <= porthi; port++) + for (int port = portlo; port <= porthi; port++) if (ip_connect(fd, af, h->address, port, timeout, fastopen_blob) == 0) { if (fd != fd6) close(fd6); @@ -651,7 +653,7 @@ if (!fd_ready(cctx->sock, timeout)) /* The socket is ready, read from it (via TLS if it's active). On EOF (i.e. close down of the connection), set errno to zero; otherwise leave it alone. */ -#ifdef SUPPORT_TLS +#ifndef DISABLE_TLS if (cctx->tls_ctx) /* client TLS */ rc = tls_read(cctx->tls_ctx, buffer, buffsize); else if (tls_in.active.sock == cctx->sock) /* server TLS */ @@ -835,8 +837,7 @@ return FALSE; void dscp_list_to_stream(FILE *stream) { -int i; -for (i=0; i < dscp_table_size; ++i) +for (int i = 0; i < dscp_table_size; ++i) fprintf(stream, "%s\n", dscp_table[i].name); }