diff options
author | Not Zed <NotZed@Ximian.com> | 2004-09-29 10:02:03 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-09-29 10:02:03 +0800 |
commit | 502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b (patch) | |
tree | 3ce1f7f190d896ca20b088e9c3ca8f4ede4a83e6 /camel/providers/nntp/camel-nntp-folder.c | |
parent | 89ae8478ced70367dd279dfc1925818eb3dfe8c3 (diff) | |
download | gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar.gz gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar.bz2 gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar.lz gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar.xz gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.tar.zst gsoc2013-evolution-502d1ef88e6b75c8a163e30dd3c804cdcd91ba6b.zip |
** See bug #66509.
2004-09-28 Not Zed <NotZed@Ximian.com>
** See bug #66509.
* providers/nntp/camel-nntp-store.c (camel_nntp_command): if we
get an error selecting the folder, disconnect/include it in the
re-try loop.
(camel_nntp_command): don't set the exception based on errno,
exception processing is already done. don't clear it if we're on
the 3rd retry.
2004-09-27 Not Zed <NotZed@Ximian.com>
* providers/nntp/camel-nntp-store.c (nntp_get_folder_info): don't
do any locking here.
(nntp_store_get_folder_info_all): move the locking here.
(nntp_store_get_subscribed_folder_info): and some here too.
* providers/nntp/camel-nntp-store.c:
* providers/nntp/camel-nntp-folder.c: Remove nntp command_lock and
just use the service connect lock for serialisation.
svn path=/trunk/; revision=27419
Diffstat (limited to 'camel/providers/nntp/camel-nntp-folder.c')
-rw-r--r-- | camel/providers/nntp/camel-nntp-folder.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c index 40abfcf5f2..7f06555b43 100644 --- a/camel/providers/nntp/camel-nntp-folder.c +++ b/camel/providers/nntp/camel-nntp-folder.c @@ -50,6 +50,7 @@ #include "camel/camel-mime-part.h" #include "camel/camel-stream-buffer.h" #include "camel/camel-i18n.h" +#include "camel/camel-private.h" #include "camel-nntp-summary.h" #include "camel-nntp-store.h" @@ -84,7 +85,7 @@ nntp_folder_refresh_info_online (CamelFolder *folder, CamelException *ex) nntp_store = (CamelNNTPStore *) folder->parent_store; nntp_folder = (CamelNNTPFolder *) folder; - CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock); + CAMEL_SERVICE_LOCK(nntp_store, connect_lock); camel_nntp_command(nntp_store, ex, nntp_folder, &line, NULL); @@ -93,7 +94,7 @@ nntp_folder_refresh_info_online (CamelFolder *folder, CamelException *ex) nntp_folder->changes = camel_folder_change_info_new(); } - CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock); + CAMEL_SERVICE_UNLOCK(nntp_store, connect_lock); if (changes) { camel_object_trigger_event ((CamelObject *) folder, "folder_changed", changes); @@ -104,17 +105,17 @@ nntp_folder_refresh_info_online (CamelFolder *folder, CamelException *ex) static void nntp_folder_sync_online (CamelFolder *folder, CamelException *ex) { - CAMEL_NNTP_STORE_LOCK(folder->parent_store, command_lock); + CAMEL_SERVICE_LOCK(folder->parent_store, connect_lock); camel_folder_summary_save (folder->summary); - CAMEL_NNTP_STORE_UNLOCK(folder->parent_store, command_lock); + CAMEL_SERVICE_UNLOCK(folder->parent_store, connect_lock); } static void nntp_folder_sync_offline (CamelFolder *folder, CamelException *ex) { - CAMEL_NNTP_STORE_LOCK(folder->parent_store, command_lock); + CAMEL_SERVICE_LOCK(folder->parent_store, connect_lock); camel_folder_summary_save (folder->summary); - CAMEL_NNTP_STORE_UNLOCK(folder->parent_store, command_lock); + CAMEL_SERVICE_UNLOCK(folder->parent_store, connect_lock); } static gboolean @@ -178,13 +179,13 @@ nntp_folder_cache_message (CamelDiscoFolder *disco_folder, const char *uid, Came } *msgid++ = 0; - CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock); + CAMEL_SERVICE_LOCK(nntp_store, connect_lock); stream = nntp_folder_download_message ((CamelNNTPFolder *) disco_folder, article, msgid, ex); if (stream) camel_object_unref (stream); - CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock); + CAMEL_SERVICE_UNLOCK(nntp_store, connect_lock); } static CamelMimeMessage * @@ -210,7 +211,7 @@ nntp_folder_get_message (CamelFolder *folder, const char *uid, CamelException *e } *msgid++ = 0; - CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock); + CAMEL_SERVICE_LOCK(nntp_store, connect_lock); /* Lookup in cache, NEWS is global messageid's so use a global cache path */ stream = camel_data_cache_get (nntp_store->cache, "cache", msgid, NULL); @@ -245,7 +246,7 @@ fail: changes = NULL; } - CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock); + CAMEL_SERVICE_UNLOCK(nntp_store, connect_lock); if (changes) { camel_object_trigger_event ((CamelObject *) folder, "folder_changed", changes); @@ -318,7 +319,7 @@ nntp_folder_append_message_online (CamelFolder *folder, CamelMimeMessage *mime_m struct _camel_header_raw *header, *savedhdrs, *n, *tail; char *group, *line; - CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock); + CAMEL_SERVICE_LOCK(nntp_store, connect_lock); /* send 'POST' command */ ret = camel_nntp_command (nntp_store, ex, NULL, &line, "post"); @@ -329,7 +330,7 @@ nntp_folder_append_message_online (CamelFolder *folder, CamelMimeMessage *mime_m else if (ret != -1) camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Posting failed: %s"), line); - CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock); + CAMEL_SERVICE_UNLOCK(nntp_store, connect_lock); return; } @@ -379,7 +380,7 @@ nntp_folder_append_message_online (CamelFolder *folder, CamelMimeMessage *mime_m g_free(group); header->next = savedhdrs; - CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock); + CAMEL_SERVICE_UNLOCK(nntp_store, connect_lock); return; } |