From 2f478348f575be5846df82c4cedeac89e6eab31c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 31 Aug 2000 04:19:23 +0000 Subject: Don't save any exceptions caused by camel_imap_folder_changed 2000-08-31 Jeffrey Stedfast * providers/imap/camel-imap-store.c (camel_imap_command_extended): Don't save any exceptions caused by camel_imap_folder_changed (camel_imap_fetch_command): Same. * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Using a new way of calculating the first recent message that seems more accurate. Also added code to make sure we don't accidently add a duplicate summary. svn path=/trunk/; revision=5135 --- camel/providers/imap/camel-imap-store.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'camel/providers/imap/camel-imap-store.c') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 4be5300e70..820c2453ce 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -785,8 +785,13 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char ** } /* Update the summary */ - if (folder && (recent > 0 || expunged->len > 0)) - camel_imap_folder_changed (folder, recent, expunged, ex); + if (folder && (recent > 0 || expunged->len > 0)) { + CamelException dex; + + camel_exception_init (&dex); + camel_imap_folder_changed (folder, recent, expunged, &dex); + camel_exception_clear (&dex); + } for (i = 0; i < data->len; i++) g_free (data->pdata[i]); @@ -826,7 +831,7 @@ camel_imap_command_extended (CamelImapStore *store, CamelFolder *folder, char ** gint camel_imap_fetch_command (CamelImapStore *store, CamelFolder *folder, char **ret, CamelException *ex, char *fmt, ...) { - /* Security Note/FIXME: We have to be careful about assuming + /* Security Note: We have to be careful about assuming * that a server response is valid as the command we are * calling may require a literal string response which could * possibly contain strings that appear to be valid server @@ -1008,8 +1013,13 @@ camel_imap_fetch_command (CamelImapStore *store, CamelFolder *folder, char **ret } /* Update the summary */ - if (folder && (recent > 0 || expunged->len > 0)) - camel_imap_folder_changed (folder, recent, expunged, ex); + if (folder && (recent > 0 || expunged->len > 0)) { + CamelException dex; + + camel_exception_init (&dex); + camel_imap_folder_changed (folder, recent, expunged, &dex); + camel_exception_clear (&dex); + } for (i = 0; i < data->len; i++) g_free (data->pdata[i]); @@ -1289,7 +1299,7 @@ camel_imap_command_continuation_with_stream (CamelImapStore *store, char **ret, "IMAP command failed: %s", word); } else { camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, - "IMAP command failed: Unknown"); + "IMAP command failed: Unknown error"); } *ret = NULL; -- cgit v1.2.3