diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-engine.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index da12a57fa5..aa7105c445 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2004-06-10 Jeffrey Stedfast <fejj@ximian.com> + + * providers/imap4/camel-imap4-engine.c + (camel_imap4_engine_handle_untagged_1): Don't always try and parse + a RESP-CODE in the BYE case as the RESP-CODE is optional. + 2004-06-10 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-store.c (imap4_build_folder_info): diff --git a/camel/providers/imap4/camel-imap4-engine.c b/camel/providers/imap4/camel-imap4-engine.c index 059c7dbe22..bd5ebfff07 100644 --- a/camel/providers/imap4/camel-imap4-engine.c +++ b/camel/providers/imap4/camel-imap4-engine.c @@ -978,7 +978,15 @@ camel_imap4_engine_handle_untagged_1 (CamelIMAP4Engine *engine, camel_imap4_toke if (token->token == CAMEL_IMAP4_TOKEN_ATOM) { if (!strcmp ("BYE", token->v.atom)) { /* we don't care if we fail here, either way we've been disconnected */ - camel_imap4_engine_parse_resp_code (engine, NULL); + if (camel_imap4_engine_next_token (engine, token, NULL) == 0) { + if (token->token == '[') { + camel_imap4_stream_unget_token (engine->istream, token); + camel_imap4_engine_parse_resp_code (engine, NULL); + } else { + camel_imap4_engine_line (engine, NULL, NULL, NULL); + } + } + engine->state = CAMEL_IMAP4_ENGINE_DISCONNECTED; /* FIXME: emit a "disconnected" signal for our Store? |