aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;