From 45627a703f6ff9b67b3612645b77b7521096d60f Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 13 Nov 2004 21:32:20 +0000 Subject: Handle numeric tokens for the COPYUID set values as well. 2004-11-13 Jeffrey Stedfast * providers/imap4/camel-imap4-engine.c (camel_imap4_engine_parse_resp_code): Handle numeric tokens for the COPYUID set values as well. svn path=/trunk/; revision=27912 --- camel/ChangeLog | 6 ++++++ 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 + + * 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 * 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: -- cgit v1.2.3