changeset 23290:9917b9a0024d

(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.
author Karl Heuer <kwzh@gnu.org>
date Mon, 21 Sep 1998 17:36:14 +0000
parents 8825530c80cd
children 15b83e8bd4da
files lib-src/movemail.c
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/movemail.c	Mon Sep 21 17:23:50 1998 +0000
+++ b/lib-src/movemail.c	Mon Sep 21 17:36:14 1998 +0000
@@ -713,13 +713,13 @@
   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 @@
       {
 	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 @@
 
   if (pop_quit (server))
     {
-      error (pop_error);
+      error ("Error from POP server: %s", pop_error);
       return (1);
     }
     
@@ -831,8 +831,10 @@
 
   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 @@
 
   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);
     }