Fixed DNS error messages

This commit is contained in:
Michiel Broek 2005-06-13 19:09:59 +00:00
parent 76119b5f20
commit 00bae4f41b
4 changed files with 10 additions and 6 deletions

View File

@ -21,6 +21,10 @@ v0.71.2 16-Jan-2005
libdiesel.a:
Changed the maximum string length from 2560 to 4096 characters.
libmbinet.a:
Fixed error messages when the host to connect to has a DNS
error.
mbcico:
Added protection during binkp receive for zero bytes compressed
data frames, this will cause uncompress error -5 because zero

View File

@ -62,14 +62,14 @@ int nntp_connect(void)
nntp_rem.sin_family = AF_INET;
if ((nhp = gethostbyname(CFG.nntpnode)) == NULL) {
WriteError("$NNTP: can't find host %s", CFG.nntpnode);
WriteError("NNTP: can't find host %s", CFG.nntpnode);
return -1;
}
nntp_rem.sin_addr.s_addr = ((struct in_addr *)(nhp->h_addr))->s_addr;
if ((nsp = getservbyname("nntp", "tcp")) == NULL) {
WriteError("$NNTP: can't find service port for nntp/tcp");
WriteError("NNTP: can't find service port for nntp/tcp");
return -1;
}
nntp_rem.sin_port = nsp->s_port;

View File

@ -58,7 +58,7 @@ int pop3_connect(void)
pop3_rem.sin_family = AF_INET;
if ((php = gethostbyname(CFG.popnode)) == NULL) {
WriteError("$POP3: can't find host %s", CFG.popnode);
WriteError("POP3: can't find host %s", CFG.popnode);
return -1;
}
@ -69,7 +69,7 @@ int pop3_connect(void)
* RedHat doesn't follow IANA specs and uses pop-3 in /etc/services
*/
if ((psp = getservbyname("pop-3", "tcp")) == NULL) {
WriteError("$POP3: can't find service port for pop3/tcp");
WriteError("POP3: can't find service port for pop3/tcp");
return -1;
}
}

View File

@ -61,14 +61,14 @@ int smtp_connect(void)
smtp_rem.sin_family = AF_INET;
if ((shp = gethostbyname(CFG.smtpnode)) == NULL) {
WriteError("$SMTP: can't find host %s", CFG.smtpnode);
WriteError("SMTP: can't find host %s", CFG.smtpnode);
return -1;
}
smtp_rem.sin_addr.s_addr = ((struct in_addr *)(shp->h_addr))->s_addr;
if ((ssp = getservbyname("smtp", "tcp")) == NULL) {
WriteError("$SMTP: can't find service port for smtp/tcp");
WriteError("SMTP: can't find service port for smtp/tcp");
return -1;
}
smtp_rem.sin_port = ssp->s_port;