diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-05-16 07:46:27 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-05-16 07:46:27 +0800 |
commit | 442cb01bee426d4a716485759ea093c773f5321a (patch) | |
tree | 3bcd14da99c58e946a8ae7aaa192d2f27834b20e /camel/providers/imap/camel-imap-store.c | |
parent | 80836cd3871291deb97325372a25d6f4a5ff2a4d (diff) | |
download | gsoc2013-evolution-442cb01bee426d4a716485759ea093c773f5321a.tar.gz gsoc2013-evolution-442cb01bee426d4a716485759ea093c773f5321a.tar.zst gsoc2013-evolution-442cb01bee426d4a716485759ea093c773f5321a.zip |
New function to parse a NAMESPACE response properly.
2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c
(imap_parse_namespace_response): New function to parse a NAMESPACE
response properly.
(imap_namespaces_destroy): New function to destroy the returned
structure from the above function.
svn path=/trunk/; revision=16927
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 6b7c293cca..4d983bebf0 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -745,6 +745,7 @@ imap_connect_online (CamelService *service, CamelException *ex) CamelImapStore *store = CAMEL_IMAP_STORE (service); CamelDiscoStore *disco_store = CAMEL_DISCO_STORE (service); CamelImapResponse *response; + struct _namespaces *namespaces; char *result, *name, *path; FILE *storeinfo; int i, flags; @@ -778,15 +779,20 @@ imap_connect_online (CamelService *service, CamelException *ex) result = camel_imap_response_extract (store, response, "NAMESPACE", ex); if (!result) goto done; - + + /* new code... */ + namespaces = imap_parse_namespace_response (result); + imap_namespaces_destroy (namespaces); + /* end new code */ + name = strstrcase (result, "NAMESPACE (("); if (name) { char *sep; name += 12; - store->namespace = imap_parse_string (&name, &len); + store->namespace = imap_parse_string ((const char **) &name, &len); if (name && *name++ == ' ') { - sep = imap_parse_string (&name, &len); + sep = imap_parse_string ((const char **) &name, &len); if (sep) { store->dir_sep = *sep; ((CamelStore *)store)->dir_sep = store->dir_sep; |