From 9b956af2644a24265efed8af3fc51852d418389b Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Mon, 21 Sep 1998 17:36:14 +0000 Subject: [PATCH] (popmail, pop_retr) [MAIL_USE_POP]: When displaying an error message from POP, mention that it's from POP, to distinguish it from local error messages. --- lib-src/movemail.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 45d6b5fe812..4e8478ee0a5 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -713,13 +713,13 @@ popmail (user, outfile, preserve, password, reverse_order) server = pop_open (0, user, password, POP_NO_GETPASS); if (! server) { - error (pop_error); + error ("Error connecting to POP server: %s", pop_error); return (1); } if (pop_stat (server, &nmsgs, &nbytes)) { - error (pop_error); + error ("Error getting message count from POP server: %s", pop_error); return (1); } @@ -805,7 +805,7 @@ popmail (user, outfile, preserve, password, reverse_order) { if (pop_delete (server, i)) { - error (pop_error); + error ("Error from POP server: %s", pop_error); pop_close (server); return (1); } @@ -813,7 +813,7 @@ popmail (user, outfile, preserve, password, reverse_order) if (pop_quit (server)) { - error (pop_error); + error ("Error from POP server: %s", pop_error); return (1); } @@ -831,8 +831,10 @@ pop_retr (server, msgno, arg) if (pop_retrieve_first (server, msgno, &line)) { - strncpy (Errmsg, pop_error, sizeof (Errmsg)); + char *error = concat ("Error from POP server: ", pop_error, ""); + strncpy (Errmsg, error, sizeof (Errmsg)); Errmsg[sizeof (Errmsg)-1] = '\0'; + free(error); return (NOTOK); } @@ -851,8 +853,10 @@ pop_retr (server, msgno, arg) if (ret) { - strncpy (Errmsg, pop_error, sizeof (Errmsg)); + char *error = concat ("Error from POP server: ", pop_error, ""); + strncpy (Errmsg, error, sizeof (Errmsg)); Errmsg[sizeof (Errmsg)-1] = '\0'; + free(error); return (NOTOK); } -- 2.39.2