X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fip.c;h=ff76b3871b4e89e98cabc5d6807e340407e99bb1;hb=2d5bf0979718f106016157dff7c6e7cdb01ac2b4;hp=22f459db9991078bfb9b207d12519efca2c55334;hpb=ee8b809061baea861fc87c41bcb72a62d76b0047;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/ip.c b/src/src/ip.c index 22f459db9..ff76b3871 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -308,7 +308,7 @@ if (fastopen_blob && f.tcp_fastopen_ok) DEBUG(D_transport|D_v) debug_printf("TFO mode connection attempt to %s, %lu data\n", address, (unsigned long)fastopen_blob->len); - tcp_out_fastopen = fastopen_blob->len > 0 ? TFO_USED : TFO_ATTEMPTED; + tcp_out_fastopen = fastopen_blob->len > 0 ? TFO_ATTEMPTED_DATA : TFO_ATTEMPTED_NODATA; if (len != fastopen_blob->len) DEBUG(D_transport|D_v) @@ -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 */ @@ -394,9 +394,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 +439,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 +451,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); @@ -835,8 +834,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); }