From 5cb61aa42f97181881ca7d4586395f099c131228 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Tue, 16 Jul 2002 20:39:08 +0000 Subject: Clean up some improper usage of CamelExceptions (looking at 2002-07-16 Peter Williams * 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. svn path=/trunk/; revision=17482 --- camel/providers/imap/camel-imap-folder.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'camel/providers/imap/camel-imap-folder.c') 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 () */ - 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); -- cgit v1.2.3