aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/providers/pop3/camel-pop3-store.c14
2 files changed, 15 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b8ef9d800e..b00ff2b246 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-08 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
+ camel_pop3_engine_iterate doesn't return the state, it returns -1
+ on fail, 0 when finished processing request or >0 if more ops are
+ in the queue, so don't check status against CAMEL_POP3_STATE_OK,
+ instead check pcp->state against that.
+
2002-05-07 Jeffrey Stedfast <fejj@ximian.com>
* camel-object.h: s/class/klass for arguments so that c++
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index ebf55ccd10..4015cb6ea1 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -495,18 +495,18 @@ pop3_try_authenticate (CamelService *service, const char *errmsg,
return FALSE;
}
- while ((status = camel_pop3_engine_iterate(store->engine, pcp)) > 0)
+ while ((status = camel_pop3_engine_iterate (store->engine, pcp)) > 0)
;
- if (status != CAMEL_POP3_COMMAND_OK) {
- if (status == CAMEL_POP3_COMMAND_ERR)
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unable to connect to POP server.\nError sending password: %s"),
- store->engine->line);
- else
+ if (pcp->state != CAMEL_POP3_COMMAND_OK) {
+ if (status == -1)
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to connect to POP server.\nError sending password: %s"),
errno ? g_strerror (errno) : _("Unknown error"));
+ else
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
+ _("Unable to connect to POP server.\nError sending password: %s"),
+ store->engine->line);
}
camel_pop3_engine_command_free(store->engine, pcp);