aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-07 02:33:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-07 02:33:20 +0800
commitc52dd7369063653732d49a3701e4e6cba40d1a25 (patch)
tree12ee2e9affad04e973860a830839a9b43ad135ae /camel
parent042a789d76fa790c1720f475525981e62005e5c1 (diff)
downloadgsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar.gz
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar.bz2
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar.lz
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar.xz
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.tar.zst
gsoc2013-evolution-c52dd7369063653732d49a3701e4e6cba40d1a25.zip
Set an exception on POP3_FAIL as well.
2001-09-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set an exception on POP3_FAIL as well. svn path=/trunk/; revision=12653
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index df8ea2f434..763901dda3 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-06 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
+ Set an exception on POP3_FAIL as well.
+
2001-09-06 Dan Winship <danw@ximian.com>
* providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
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 <stdlib.h>
#include <string.h>
+#include <errno.h>
+
#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;
}