aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-08-01 12:57:01 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-08-01 12:57:01 +0800
commit6f22eb642b794def699ce9341219f56d793a50fb (patch)
tree13397d532bcc83b891e7d4dfc8e46b72d37d819c /camel/camel-folder.c
parent96d24f1297eaa5a6333b9fcfdf35420d273703af (diff)
downloadgsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.gz
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.bz2
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.lz
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.xz
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.zst
gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.zip
Slightly re-arranged filter/change notification logic. If we;re filtering,
2001-08-01 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Slightly re-arranged filter/change notification logic. If we;re filtering, freeze the folder till we're finished to smooth the ui for new mail. 2001-07-31 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_init): Chagned mutexes to e_mutexes, folder lock recursive. This fixes the imap filtering bug, or at least some cases of it. (camel_folder_finalize): Free mutexes. * camel-private.h (CamelFolderPrivate): Changed mutexes to e_mutexes. 2001-07-25 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_change_info_*): Change the return if fail's into asserts. (camel_folder_change_info_free): Don't let it accept a NULL argument. This isn't g_lib so we dont have to. svn path=/trunk/; revision=11537
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index ca40c8b0dc..ffd36cb730 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -173,8 +173,8 @@ camel_folder_init (gpointer object, gpointer klass)
folder->priv->frozen = 0;
folder->priv->changed_frozen = camel_folder_change_info_new();
#ifdef ENABLE_THREADS
- folder->priv->lock = g_mutex_new();
- folder->priv->change_lock = g_mutex_new();
+ folder->priv->lock = e_mutex_new(E_MUTEX_REC);
+ folder->priv->change_lock = e_mutex_new(E_MUTEX_SIMPLE);
#endif
}
@@ -194,8 +194,8 @@ camel_folder_finalize (CamelObject *object)
camel_folder_change_info_free(camel_folder->priv->changed_frozen);
#ifdef ENABLE_THREADS
- g_mutex_free(camel_folder->priv->lock);
- g_mutex_free(camel_folder->priv->change_lock);
+ e_mutex_destroy(camel_folder->priv->lock);
+ e_mutex_destroy(camel_folder->priv->change_lock);
#endif
g_free(camel_folder->priv);
}
@@ -1481,7 +1481,7 @@ camel_folder_change_info_add_source(CamelFolderChangeInfo *info, const char *uid
{
struct _CamelFolderChangeInfoPrivate *p;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1505,8 +1505,8 @@ camel_folder_change_info_add_source_list(CamelFolderChangeInfo *info, const GPtr
struct _CamelFolderChangeInfoPrivate *p;
int i;
- g_return_if_fail (info != NULL);
- g_return_if_fail (list != NULL);
+ g_assert(info != NULL);
+ g_assert(list != NULL);
p = info->priv;
@@ -1535,7 +1535,7 @@ camel_folder_change_info_add_update(CamelFolderChangeInfo *info, const char *uid
char *key;
int value;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1563,8 +1563,8 @@ camel_folder_change_info_add_update_list(CamelFolderChangeInfo *info, const GPtr
{
int i;
- g_return_if_fail (info != NULL);
- g_return_if_fail (list != NULL);
+ g_assert(info != NULL);
+ g_assert(list != NULL);
for (i=0;i<list->len;i++)
camel_folder_change_info_add_update(info, list->pdata[i]);
@@ -1604,7 +1604,7 @@ camel_folder_change_info_build_diff(CamelFolderChangeInfo *info)
{
struct _CamelFolderChangeInfoPrivate *p;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1635,8 +1635,8 @@ change_info_cat(CamelFolderChangeInfo *info, GPtrArray *source, void (*add)(Came
void
camel_folder_change_info_cat(CamelFolderChangeInfo *info, CamelFolderChangeInfo *source)
{
- g_return_if_fail (info != NULL);
- g_return_if_fail (source != NULL);
+ g_assert(info != NULL);
+ g_assert(source != NULL);
change_info_cat(info, source->uid_added, camel_folder_change_info_add_uid);
change_info_cat(info, source->uid_removed, camel_folder_change_info_remove_uid);
@@ -1657,7 +1657,7 @@ camel_folder_change_info_add_uid(CamelFolderChangeInfo *info, const char *uid)
GPtrArray *olduids;
char *olduid;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1691,7 +1691,7 @@ camel_folder_change_info_remove_uid(CamelFolderChangeInfo *info, const char *uid
GPtrArray *olduids;
char *olduid;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1724,7 +1724,7 @@ camel_folder_change_info_change_uid(CamelFolderChangeInfo *info, const char *uid
GPtrArray *olduids;
char *olduid;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1749,7 +1749,7 @@ camel_folder_change_info_change_uid(CamelFolderChangeInfo *info, const char *uid
gboolean
camel_folder_change_info_changed(CamelFolderChangeInfo *info)
{
- g_return_val_if_fail (info != NULL, FALSE);
+ g_assert(info != NULL);
return (info->uid_added->len || info->uid_removed->len || info->uid_changed->len);
}
@@ -1765,7 +1765,7 @@ camel_folder_change_info_clear(CamelFolderChangeInfo *info)
{
struct _CamelFolderChangeInfoPrivate *p;
- g_return_if_fail (info != NULL);
+ g_assert(info != NULL);
p = info->priv;
@@ -1791,9 +1791,8 @@ void
camel_folder_change_info_free(CamelFolderChangeInfo *info)
{
struct _CamelFolderChangeInfoPrivate *p;
-
- if (info == NULL)
- return;
+
+ g_assert(info != NULL);
p = info->priv;