From a402b06dfa66057d8955c4533ee6209d4f5493e4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 21 Nov 1996 20:45:44 +0000 Subject: Better error messages. svn path=/trunk/; revision=568 --- fetchmail.c | 13 +++++++++---- 1 file 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 -- cgit v1.2.3