diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-engine.c | 24 |
2 files changed, 22 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 5f2169a387..20f9aed116 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2004-11-13 Jeffrey Stedfast <fejj@ximian.com> + + * providers/imap4/camel-imap4-engine.c + (camel_imap4_engine_parse_resp_code): Handle numeric tokens for + the COPYUID set values as well. + 2004-11-12 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-summary.c (camel_imap4_summary_new): diff --git a/camel/providers/imap4/camel-imap4-engine.c b/camel/providers/imap4/camel-imap4-engine.c index d392f054ea..d6f17532ee 100644 --- a/camel/providers/imap4/camel-imap4-engine.c +++ b/camel/providers/imap4/camel-imap4-engine.c @@ -900,26 +900,34 @@ camel_imap4_engine_parse_resp_code (CamelIMAP4Engine *engine, CamelException *ex if (camel_imap4_engine_next_token (engine, &token, ex) == -1) return -1; - if (token.token != CAMEL_IMAP4_TOKEN_ATOM) { - d(fprintf (stderr, "Expected an atom token as the second argument to the COPYUID RESP-CODE\n")); + if (token.token != CAMEL_IMAP4_TOKEN_ATOM && token.token != CAMEL_IMAP4_TOKEN_NUMBER) { + d(fprintf (stderr, "Expected an atom or numeric token as the second argument to the COPYUID RESP-CODE\n")); camel_imap4_utils_set_unexpected_token_error (ex, engine, &token); goto exception; } - if (resp != NULL) - resp->v.copyuid.srcset = g_strdup (token.v.atom); + if (resp != NULL) { + if (token.token == CAMEL_IMAP4_TOKEN_NUMBER) + resp->v.copyuid.srcset = g_strdup_printf ("%u", token.v.number); + else + resp->v.copyuid.srcset = g_strdup (token.v.atom); + } if (camel_imap4_engine_next_token (engine, &token, ex) == -1) return -1; - if (token.token != CAMEL_IMAP4_TOKEN_ATOM) { - d(fprintf (stderr, "Expected an atom token as the third argument to the APPENDUID RESP-CODE\n")); + if (token.token != CAMEL_IMAP4_TOKEN_ATOM && token.token != CAMEL_IMAP4_TOKEN_NUMBER) { + d(fprintf (stderr, "Expected an atom or numeric token as the third argument to the APPENDUID RESP-CODE\n")); camel_imap4_utils_set_unexpected_token_error (ex, engine, &token); goto exception; } - if (resp != NULL) - resp->v.copyuid.destset = g_strdup (token.v.atom); + if (resp != NULL) { + if (token.token == CAMEL_IMAP4_TOKEN_NUMBER) + resp->v.copyuid.destset = g_strdup_printf ("%u", token.v.number); + else + resp->v.copyuid.destset = g_strdup (token.v.atom); + } break; default: |