aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog13
-rw-r--r--camel/providers/imap/camel-imap-folder.c10
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c5
-rw-r--r--camel/providers/imap/camel-imap-store.c9
4 files changed, 27 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 4eb8fed1a4..e932cd42d6 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,16 @@
+2002-07-16 Peter Williams <peterw@ximian.com>
+
+ * providers/imap/camel-imap-folder.c (imap_sync_online): Clean
+ up some improper usage of CamelExceptions (looking at
+ camel_exception_is_set when ex = NULL).
+
+ * providers/imap/camel-imap-store.c (get_folder_online): Here too.
+
+ * providers/imap/camel-imap-message-cache.c
+ (camel_imap_message_cache_new): Nothing sets the exception so
+ don't bother to check it at the end of this function. Prevents
+ a warning about checking a NULL exception's value.
+
2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (smtp_helo): Make the
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 8688adb8a0..2676dc1db9 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -711,11 +711,13 @@ imap_sync_online (CamelFolder *folder, CamelException *ex)
CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
CamelImapResponse *response = NULL;
CamelMessageInfo *info;
+ CamelException local_ex;
GPtrArray *matches;
char *set, *flaglist;
gboolean unset;
int i, j, max;
+ camel_exception_init (&local_ex);
CAMEL_IMAP_STORE_LOCK (store, command_lock);
/* Find a message with changed flags, find all of the other
@@ -751,7 +753,7 @@ imap_sync_online (CamelFolder *folder, CamelException *ex)
camel_folder_summary_info_free (folder->summary, info);
/* Note: to `unset' flags, use -FLAGS.SILENT (<flag list>) */
- response = camel_imap_command (store, folder, ex,
+ response = camel_imap_command (store, folder, &local_ex,
"UID STORE %s %sFLAGS.SILENT %s",
set, unset ? "-" : "", flaglist);
g_free (set);
@@ -760,7 +762,7 @@ imap_sync_online (CamelFolder *folder, CamelException *ex)
if (response)
camel_imap_response_free (store, response);
- if (!camel_exception_is_set (ex)) {
+ if (!camel_exception_is_set (&local_ex)) {
for (j = 0; j < matches->len; j++) {
info = matches->pdata[j];
info->flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
@@ -780,8 +782,10 @@ imap_sync_online (CamelFolder *folder, CamelException *ex)
CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
/* check for an exception */
- if (camel_exception_is_set (ex))
+ if (camel_exception_is_set (&local_ex)) {
+ camel_exception_xfer (ex, &local_ex);
return;
+ }
/* Re-lock the command_lock */
CAMEL_IMAP_STORE_LOCK (store, command_lock);
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index 0138441b3b..b29a2280ef 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -190,11 +190,6 @@ camel_imap_message_cache_new (const char *path, CamelFolderSummary *summary,
}
g_ptr_array_free (deletes, TRUE);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (cache));
- return NULL;
- }
-
return cache;
}
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index f899168595..fbc6c39b31 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1349,10 +1349,15 @@ get_folder_online (CamelStore *store, const char *folder_name,
new_folder = camel_imap_folder_new (store, folder_name, folder_dir, ex);
g_free (folder_dir);
if (new_folder) {
+ CamelException local_ex;
+
imap_store->current_folder = new_folder;
camel_object_ref (CAMEL_OBJECT (new_folder));
- camel_imap_folder_selected (new_folder, response, ex);
- if (camel_exception_is_set (ex)) {
+ camel_exception_init (&local_ex);
+ camel_imap_folder_selected (new_folder, response, &local_ex);
+
+ if (camel_exception_is_set (&local_ex)) {
+ camel_exception_xfer (ex, &local_ex);
camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
imap_store->current_folder = NULL;
camel_object_unref (CAMEL_OBJECT (new_folder));