aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-11-13 02:28:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-11-13 02:28:40 +0800
commitae7b8c3242c45fe5ab51bbd1e948a4161b5092c0 (patch)
tree4b0daba43c8dc8116e4c0108906bc2484ac1c501
parent59d538eb71ab45f0aa792f579438fe72e33aa561 (diff)
downloadgsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar.gz
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar.bz2
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar.lz
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar.xz
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.tar.zst
gsoc2013-evolution-ae7b8c3242c45fe5ab51bbd1e948a4161b5092c0.zip
Properly handle NILs for the namespace separator (somehow I missed this,
2004-11-12 Jeffrey Stedfast <fejj@novell.com> * providers/imap4/camel-imap4-engine.c (engine_parse_namespace): Properly handle NILs for the namespace separator (somehow I missed this, silly me). svn path=/trunk/; revision=27906
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap4/camel-imap4-engine.c16
2 files changed, 19 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 6fe3ebbbb9..3343c96247 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-12 Jeffrey Stedfast <fejj@novell.com>
+
+ * providers/imap4/camel-imap4-engine.c (engine_parse_namespace):
+ Properly handle NILs for the namespace separator (somehow I missed
+ this, silly me).
+
2004-11-12 Not Zed <NotZed@Ximian.com>
** Merge in notzed-messageinfo-branch, fix some minor conflicts.
diff --git a/camel/providers/imap4/camel-imap4-engine.c b/camel/providers/imap4/camel-imap4-engine.c
index 87cf54b35d..d392f054ea 100644
--- a/camel/providers/imap4/camel-imap4-engine.c
+++ b/camel/providers/imap4/camel-imap4-engine.c
@@ -604,8 +604,19 @@ engine_parse_namespace (CamelIMAP4Engine *engine, CamelException *ex)
goto exception;
}
- if (token.token != CAMEL_IMAP4_TOKEN_QSTRING || strlen (token.v.qstring) > 1) {
- d(fprintf (stderr, "Expected to find a qstring token as second element in NAMESPACE pair\n"));
+ switch (token.token) {
+ case CAMEL_IMAP4_TOKEN_NIL:
+ node->sep = '\0';
+ break;
+ case CAMEL_IMAP4_TOKEN_QSTRING:
+ if (strlen (token.v.qstring) == 1) {
+ node->sep = *token.v.qstring;
+ break;
+ } else {
+ /* invalid, fall thru */
+ }
+ default:
+ d(fprintf (stderr, "Expected to find a nil or a valid qstring token as second element in NAMESPACE pair\n"));
camel_imap4_utils_set_unexpected_token_error (ex, engine, &token);
g_free (node->path);
g_free (node);
@@ -613,7 +624,6 @@ engine_parse_namespace (CamelIMAP4Engine *engine, CamelException *ex)
goto exception;
}
- node->sep = *token.v.qstring;
tail->next = node;
tail = node;