diff options
author | Peter Williams <peterw@ximian.com> | 2002-07-17 04:39:08 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-07-17 04:39:08 +0800 |
commit | 5cb61aa42f97181881ca7d4586395f099c131228 (patch) | |
tree | 2ff550e84bfec0343e9bbea3c0f1443f41082eaa /camel/providers/imap/camel-imap-folder.c | |
parent | 8535245dde06ffb9b5f9679ca9e5e5944fffc3e5 (diff) | |
download | gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar.gz gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar.bz2 gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar.lz gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar.xz gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.tar.zst gsoc2013-evolution-5cb61aa42f97181881ca7d4586395f099c131228.zip |
Clean up some improper usage of CamelExceptions (looking at
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.
svn path=/trunk/; revision=17482
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 10 |
1 files changed, 7 insertions, 3 deletions
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); |