aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-27 12:35:18 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-27 12:35:18 +0800
commit7e4fb782fad1703aeda91745545af7b0fc01bed3 (patch)
tree269eff2be2ecb3d1b856034e3826b9fb11565b73
parent5aef76bbcb9099e86d4ea591f6e4cba1cee1b415 (diff)
downloadgsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar.gz
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar.bz2
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar.lz
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar.xz
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.tar.zst
gsoc2013-evolution-7e4fb782fad1703aeda91745545af7b0fc01bed3.zip
Move all of the camel_vee_folder_construct() internals here.
2001-03-26 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (vee_folder_construct): Move all of the camel_vee_folder_construct() internals here. (camel_vee_folder_construct): This function basically becomes a wrapper for vee_folder_construct and also checks to make sure that the UNMATCHED vfodler is constructed otherwise constructs it. (camel_vee_folder_new): Call vee_folder_construct() instead so that we don't get into a dead-lock. svn path=/trunk/; revision=8964
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/camel-vee-folder.c29
2 files changed, 34 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b4413e885f..adbea47d31 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,15 @@
2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
+ * camel-vee-folder.c (vee_folder_construct): Move all of the
+ camel_vee_folder_construct() internals here.
+ (camel_vee_folder_construct): This function basically becomes a
+ wrapper for vee_folder_construct and also checks to make sure that
+ the UNMATCHED vfodler is constructed otherwise constructs it.
+ (camel_vee_folder_new): Call vee_folder_construct() instead so
+ that we don't get into a dead-lock.
+
+2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
+
* camel-store.c (init_trash): Use camel_vtrash_folder_new() to
create the vtrash folder now.
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 1a54f8e657..f2045a6bab 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -191,12 +191,12 @@ camel_vee_folder_finalise (CamelObject *obj)
g_free(p);
}
-void
-camel_vee_folder_construct(CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags)
+static void
+vee_folder_construct (CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags)
{
CamelFolder *folder = (CamelFolder *)vf;
char *tmp;
-
+
vf->flags = flags;
tmp = strchr(name, '?');
@@ -219,6 +219,25 @@ camel_vee_folder_construct(CamelVeeFolder *vf, CamelStore *parent_store, const c
folder->summary->message_info_size = sizeof(CamelVeeMessageInfo);
}
+void
+camel_vee_folder_construct(CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags)
+{
+ UNMATCHED_LOCK();
+
+ /* setup unmatched folder if we haven't yet */
+ if (folder_unmatched == NULL) {
+ unmatched_uids = g_hash_table_new (g_str_hash, g_str_equal);
+ folder_unmatched = (CamelVeeFolder *)camel_object_new (camel_vee_folder_get_type ());
+ printf("created foldeer unmatched %p\n", folder_unmatched);
+
+ vee_folder_construct (folder_unmatched, parent_store, "UNMATCHED", CAMEL_STORE_FOLDER_PRIVATE);
+ }
+
+ UNMATCHED_UNLOCK();
+
+ vee_folder_construct (vf, parent_store, name, flags);
+}
+
/**
* camel_vee_folder_new:
* @parent_store: the parent CamelVeeStore
@@ -242,7 +261,7 @@ camel_vee_folder_new(CamelStore *parent_store, const char *name, guint32 flags)
unmatched_uids = g_hash_table_new(g_str_hash, g_str_equal);
folder_unmatched = vf = (CamelVeeFolder *)camel_object_new(camel_vee_folder_get_type());
printf("created foldeer unmatched %p\n", folder_unmatched);
- camel_vee_folder_construct(vf, parent_store, "UNMATCHED", CAMEL_STORE_FOLDER_PRIVATE);
+ vee_folder_construct (vf, parent_store, "UNMATCHED", CAMEL_STORE_FOLDER_PRIVATE);
}
UNMATCHED_UNLOCK();
@@ -260,7 +279,7 @@ camel_vee_folder_new(CamelStore *parent_store, const char *name, guint32 flags)
}
vf = (CamelVeeFolder *)camel_object_new(camel_vee_folder_get_type());
- camel_vee_folder_construct(vf, parent_store, name, flags);
+ vee_folder_construct(vf, parent_store, name, flags);
printf("returning folder %s %p, count = %d\n", name, vf, camel_folder_get_message_count((CamelFolder *)vf));