diff options
Diffstat (limited to 'camel/providers/pop3/camel-pop3-store.c')
-rw-r--r-- | camel/providers/pop3/camel-pop3-store.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index c1cb5e1060..c163e844c9 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -143,6 +143,8 @@ finalize (CamelObject *object) if (pop3_store->apop_timestamp) g_free (pop3_store->apop_timestamp); + if (pop3_store->implementation) + g_free (pop3_store->implementation); } static gboolean @@ -217,8 +219,16 @@ connect_to_server (CamelService *service, CamelException *ex) /* Read the greeting, check status */ status = pop3_get_response (store, &buf, ex); - if (status != CAMEL_POP3_OK) + switch (status) { + case CAMEL_POP3_ERR: + camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, + _("Could not connect to server: %s"), + buf); + g_free (buf); + /* fall through */ + case CAMEL_POP3_FAIL: return FALSE; + } if (buf) { apoptime = strchr (buf, '<'); @@ -519,7 +529,8 @@ get_trash (CamelStore *store, CamelException *ex) * Return value: one of CAMEL_POP3_OK (command executed successfully), * CAMEL_POP3_ERR (command encounted an error), or CAMEL_POP3_FAIL * (a protocol-level error occurred, and Camel is uncertain of the - * result of the command.) + * result of the command.) @ex will be set if the return value is + * CAMEL_POP3_FAIL, but *NOT* if it is CAMEL_POP3_ERR. **/ int camel_pop3_command (CamelPop3Store *store, char **ret, CamelException *ex, char *fmt, ...) |