diff options
| author | heas <heas@NetBSD.org> | 2004-03-27 16:31:19 +0000 |
|---|---|---|
| committer | heas <heas@NetBSD.org> | 2004-03-27 16:31:19 +0000 |
| commit | f32166d8a91a2c82316a00a40ee4842e27ec245d (patch) | |
| tree | 23fa8e0342da03f7dc80d4e582d0351d2a2f3724 /gnu/dist/postfix/src/smtp | |
| parent | 5f1ffa71fcd47bffcc5eb3f23221d6570b558e8f (diff) | |
merge from 2.0.19 import
Diffstat (limited to 'gnu/dist/postfix/src/smtp')
| -rw-r--r-- | gnu/dist/postfix/src/smtp/smtp_connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/dist/postfix/src/smtp/smtp_connect.c b/gnu/dist/postfix/src/smtp/smtp_connect.c index 173ec7461de..2fe78eec1a1 100644 --- a/gnu/dist/postfix/src/smtp/smtp_connect.c +++ b/gnu/dist/postfix/src/smtp/smtp_connect.c @@ -112,6 +112,7 @@ #include <timed_connect.h> #include <stringops.h> #include <host_port.h> +#include <sane_connect.h> /* Global library. */ @@ -208,7 +209,7 @@ static SMTP_SESSION *smtp_connect_addr(DNS_RR *addr, unsigned port, non_blocking(sock, BLOCKING); errno = saved_errno; } else { - conn_stat = connect(sock, (struct sockaddr *) & sin, sizeof(sin)); + conn_stat = sane_connect(sock, (struct sockaddr *) & sin, sizeof(sin)); } if (conn_stat < 0) { vstring_sprintf(why, "connect to %s[%s]: %m", @@ -345,7 +346,7 @@ static char *smtp_parse_destination(char *destination, char *def_service, /* * Convert service to port number, network byte order. */ - if ((port = atoi(service)) != 0) { + if (alldig(service) && (port = atoi(service)) != 0) { *portp = htons(port); } else { if ((sp = getservbyname(service, protocol)) == 0) |
