aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-11-21 20:45:44 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-11-21 20:45:44 +0000
commita402b06dfa66057d8955c4533ee6209d4f5493e4 (patch)
tree78750a0b6f4495a8d04a5367bdaf56e9db2450cd
parent5d886c3c99aa8db3723f7e5e55411a212ef57a23 (diff)
downloadfetchmail-a402b06dfa66057d8955c4533ee6209d4f5493e4.tar.gz
fetchmail-a402b06dfa66057d8955c4533ee6209d4f5493e4.tar.bz2
fetchmail-a402b06dfa66057d8955c4533ee6209d4f5493e4.zip
Better error messages.
svn path=/trunk/; revision=568
-rw-r--r--fetchmail.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 49355f5c..3dea6252 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -329,12 +329,17 @@ int main (int argc, char **argv)
namerec = gethostbyname(ctl->servername);
if (namerec == (struct hostent *)NULL)
{
+ fprintf(stderr,
+ "fetchmail: skipping %s poll, ",
+ ctl->servername);
if (errno)
- perror("fetchmail: initialization error");
+ {
+ perror("general error");
+ if (errno == ENETUNREACH)
+ break; /* go to sleep */
+ }
else
- fprintf(stderr,
- "fetchmail: skipping %s poll, nameserver isn't responding\n",
- ctl->servername);
+ herror("DNS error");
continue;
}
else