evolution-data-server r9477 - trunk/camel/providers/imap
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9477 - trunk/camel/providers/imap
- Date: Thu, 4 Sep 2008 09:00:23 +0000 (UTC)
Author: mcrha
Date: Thu Sep 4 09:00:23 2008
New Revision: 9477
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9477&view=rev
Log:
2008-09-04 Milan Crha <mcrha redhat com>
** Fix for bug #547884
* camel-imap-folder.c: (imap_get_quota_info):
Do not crash on unexpected response, rather skip it.
Modified:
trunk/camel/providers/imap/ChangeLog
trunk/camel/providers/imap/camel-imap-folder.c
Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c (original)
+++ trunk/camel/providers/imap/camel-imap-folder.c Thu Sep 4 09:00:23 2008
@@ -3784,6 +3784,7 @@
const char *resp = response->untagged->pdata[i];
if (resp && g_str_has_prefix (resp, "* QUOTA ")) {
+ gboolean skipped = TRUE;
size_t sz;
char *astr;
@@ -3796,13 +3797,15 @@
if (resp && *resp == '(') {
char *name;
- const char *used, *total;
+ const char *used = NULL, *total = NULL;
resp++;
name = imap_parse_astring (&resp, &sz);
- used = imap_next_word (resp);
- total = imap_next_word (used);
+ if (resp)
+ used = imap_next_word (resp);
+ if (used)
+ total = imap_next_word (used);
while (resp && *resp && *resp != ')')
resp++;
@@ -3822,11 +3825,15 @@
res = info;
last = info;
+ skipped = FALSE;
}
}
g_free (name);
}
+
+ if (skipped)
+ g_debug ("Unexpected quota response '%s'; skipping it...", (const char *)response->untagged->pdata[i]);
}
}
camel_imap_response_free (imap_store, response);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]