aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-11-14 05:32:20 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-11-14 05:32:20 +0800
commit45627a703f6ff9b67b3612645b77b7521096d60f (patch)
tree5f100974f69a30450c5462a04ebe34711d0e17c4 /camel
parenta8e4d1b008707697ab60d0809dc7fd5d7098a9ea (diff)
downloadgsoc2013-evolution-45627a703f6ff9b67b3612645b77b7521096d60f.tar.gz
gsoc2013-evolution-45627a703f6ff9b67b3612645b77b7521096d60f.tar.zst
gsoc2013-evolution-45627a703f6ff9b67b3612645b77b7521096d60f.zip
Handle numeric tokens for the COPYUID set values as well.
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. svn path=/trunk/; revision=27912
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap4/camel-imap4-engine.c24
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: