aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-store.h
diff options
context:
space:
mode:
authorJoe Shaw <joe@ximian.com>2001-07-06 12:11:27 +0800
committerJoe Shaw <joeshaw@src.gnome.org>2001-07-06 12:11:27 +0800
commitccbc3a36887e4ab7e442c649ddae53f6e964f40f (patch)
tree08802644edeba3b8d14cc5096161ef3ef6e36039 /camel/providers/nntp/camel-nntp-store.h
parent2583bd0d41a6ef0bcf91ebc8788157aad57a312e (diff)
downloadgsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar.gz
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar.bz2
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar.lz
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar.xz
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.tar.zst
gsoc2013-evolution-ccbc3a36887e4ab7e442c649ddae53f6e964f40f.zip
Add locking to camel_nntp_get_grouplist_from_server().
2001-07-06 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-grouplist.c: Add locking to camel_nntp_get_grouplist_from_server(). * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_EXTENSIONS_SUPPORTED (202). * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes out of this, but that's what was already there...) Also, put some locking around it. (finalize): e_mutex_destroy() the command lock (camel_nntp_store_init): e_mutex_new() the command lock. * providers/nntp/camel-nntp-store.h: Add locking macros. svn path=/trunk/; revision=10838
Diffstat (limited to 'camel/providers/nntp/camel-nntp-store.h')
-rw-r--r--camel/providers/nntp/camel-nntp-store.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
index 225180dbcc..8841874e0c 100644
--- a/camel/providers/nntp/camel-nntp-store.h
+++ b/camel/providers/nntp/camel-nntp-store.h
@@ -35,12 +35,17 @@ extern "C" {
#include "camel-nntp-newsrc.h"
#include "camel-nntp-types.h"
+#include "config.h"
+
+#ifdef ENABLE_THREADS
+#include "e-util/e-msgport.h"
+#endif
+
#define CAMEL_NNTP_STORE_TYPE (camel_nntp_store_get_type ())
#define CAMEL_NNTP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
#define CAMEL_NNTP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
#define CAMEL_IS_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
-
enum {
CAMEL_NNTP_OVER_FROM,
CAMEL_NNTP_OVER_SUBJECT,
@@ -79,6 +84,9 @@ struct CamelNNTPStore {
CamelNNTPNewsrc *newsrc;
CamelNNTPGroupList *group_list;
+#ifdef ENABLE_THREADS
+ EMutex *command_lock;
+#endif
};
struct CamelNNTPStoreClass {
@@ -86,6 +94,13 @@ struct CamelNNTPStoreClass {
};
+#ifdef ENABLE_THREADS
+#define CAMEL_NNTP_STORE_LOCK(f) (e_mutex_lock(((CamelNNTPStore *) f)->command_lock))
+#define CAMEL_NNTP_STORE_UNLOCK(f) (e_mutex_unlock(((CamelNNTPStore *) f)->command_lock))
+#else
+#define CAMEL_NNTP_STORE_LOCK(f)
+#define CAMEL_NNTP_STORE_UNLOCK(f)
+#endif
/* public methods */
void camel_nntp_store_open (CamelNNTPStore *store, CamelException *ex);