aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3/camel-pop3-folder.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-19 01:59:56 +0800
committerDan Winship <danw@src.gnome.org>2001-04-19 01:59:56 +0800
commit765e7194f1459f226b91ffc027024553e2d1a64b (patch)
treef14760fa835fcef15c764f819c1426506b4f56a3 /camel/providers/pop3/camel-pop3-folder.c
parentaa9071a09452e98b5e2a8842b3d2a0f288f2514d (diff)
downloadgsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar.gz
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar.bz2
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar.lz
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar.xz
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.tar.zst
gsoc2013-evolution-765e7194f1459f226b91ffc027024553e2d1a64b.zip
Free base_url and storage_path.
* providers/imap/camel-imap-store.c (camel_imap_store_finalize): Free base_url and storage_path. * providers/pop3/camel-pop3-store.c (finalize): Free the implementation string. (camel_pop3_command): Clarify documentation to mention that @ex isn't set (and *@ret is) on CAMEL_POP3_ERR. (connect_to_server): Set @ex properly on CAMEL_POP3_ERR. * providers/pop3/camel-pop3-folder.c (pop3_refresh_info, pop3_get_message): Set @ex properly on CAMEL_POP3_ERR. svn path=/trunk/; revision=9450
Diffstat (limited to 'camel/providers/pop3/camel-pop3-folder.c')
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 96b5471828..4d5c066491 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -149,7 +149,14 @@ pop3_refresh_info (CamelFolder *folder, CamelException *ex)
camel_operation_start(NULL, _("Retrieving POP summary"));
status = camel_pop3_command (pop3_store, &data, ex, "STAT");
- if (status != CAMEL_POP3_OK) {
+ switch (status) {
+ case CAMEL_POP3_ERR:
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("Could not check POP server for new messages: %s"),
+ data);
+ g_free (data);
+ /* fall through */
+ case CAMEL_POP3_FAIL:
camel_operation_end(NULL);
return;
}
@@ -290,12 +297,18 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
&result, ex, "RETR %d", num);
- if (status != CAMEL_POP3_OK) {
+ switch (status) {
+ case CAMEL_POP3_ERR:
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("Could not fetch message: %s"), result);
+ g_free (result);
+ /* fall through */
+ case CAMEL_POP3_FAIL:
camel_operation_end(NULL);
return NULL;
}
- /* this should be "nnn octets" ? */
+ /* this should be "nnn octets" ? No. RTFRFC. FIXME. */
if (result && sscanf (result, "%d", &total) != 1)
total = 0;