From c52dd7369063653732d49a3701e4e6cba40d1a25 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 6 Sep 2001 18:33:20 +0000 Subject: Set an exception on POP3_FAIL as well. 2001-09-06 Jeffrey Stedfast * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set an exception on POP3_FAIL as well. svn path=/trunk/; revision=12653 --- camel/providers/pop3/camel-pop3-folder.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'camel/providers/pop3/camel-pop3-folder.c') diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index d18680dddd..a87c77f3a1 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -40,6 +40,8 @@ #include #include +#include + #define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o))) static CamelFolderClass *parent_class; @@ -331,11 +333,11 @@ pop3_get_message_stream (CamelFolder *folder, int id, gboolean headers_only, Cam &result, ex, headers_only ? "TOP %d 0" : "RETR %d", id); switch (status) { case CAMEL_POP3_ERR: + case CAMEL_POP3_FAIL: camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, - _("Could not fetch message: %s"), result); + _("Could not fetch message: %s"), result ? result : + errno ? g_strerror (errno) : _("Unknown error")); g_free (result); - /* fall through */ - case CAMEL_POP3_FAIL: camel_operation_end (NULL); return NULL; } -- cgit v1.2.3