aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-08 14:40:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-08 14:40:41 +0800
commit71447cb8c404925552da5719153dbe66a8843b0e (patch)
tree0215e47ab6d69cdd54c984da9af6a301db355b81 /camel/providers
parentd616d97a3ef8a1202933ba2000b363d0dcb69d3d (diff)
downloadgsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar.gz
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar.bz2
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar.lz
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar.xz
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.tar.zst
gsoc2013-evolution-71447cb8c404925552da5719153dbe66a8843b0e.zip
camel_pop3_engine_iterate doesn't return the state, it returns -1 on fail,
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. svn path=/trunk/; revision=16719
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/pop3/camel-pop3-store.c14
1 files changed, 7 insertions, 7 deletions
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);