aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-06-03 00:12:26 +0800
committerChris Lahey <clahey@src.gnome.org>2000-06-03 00:12:26 +0800
commit8d6afbe9102a979e28c861e3e4d34900cadd2eae (patch)
tree03d3c424f0cce1a7a965d05e707af6b773cc2c18 /camel/camel-store.c
parentac5683a1daaec4bf129ba1f59d80d8ea496efaab (diff)
downloadgsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.gz
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.tar.zst
gsoc2013-evolution-8d6afbe9102a979e28c861e3e4d34900cadd2eae.zip
Ref and unref objects in the service cache properly.
2000-06-02 Christopher James Lahey <clahey@helixcode.com> * camel-session.c: Ref and unref objects in the service cache properly. * camel-store.c: Ref the folder when returning it using lookup_folder. Used the folder's full name for the key for the folder cache since that's used to uncache it. svn path=/trunk/; revision=3388
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index b4eae9975e..ab0c4241f7 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -151,8 +151,12 @@ get_default_folder_name (CamelStore *store, CamelException *ex)
static CamelFolder *
lookup_folder (CamelStore *store, const char *folder_name)
{
- if (store->folders)
- return g_hash_table_lookup (store->folders, folder_name);
+ if (store->folders) {
+ CamelFolder *folder = g_hash_table_lookup (store->folders, folder_name);
+ if (folder)
+ gtk_object_ref(GTK_OBJECT(folder));
+ return folder;
+ }
return NULL;
}
@@ -166,7 +170,7 @@ cache_folder (CamelStore *store, const char *folder_name, CamelFolder *folder)
g_warning ("Caching folder %s that already exists.",
folder_name);
}
- g_hash_table_insert (store->folders, (gpointer)g_strdup(folder_name), folder);
+ g_hash_table_insert (store->folders, camel_folder_get_full_name (folder), folder);
gtk_signal_connect_object (GTK_OBJECT (folder), "destroy",
GTK_SIGNAL_FUNC (CS_CLASS (store)->uncache_folder),
GTK_OBJECT (store));
3.) default options must be added toehaupt2014-02-101-0/+3 * Chase boost and icu bumpbapt2014-02-071-1/+1 * Reduce over inclusion of bsd.port.mkbapt2014-01-161-3/+1 * In preparation for making libtool generate libraries with a sane name, fix allbapt2013-12-111-1/+1 * - Remove manual creation and removal of share/applications, as it's now in th...amdmi32013-10-221-1/+0 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-201-0/+1 * Convert a bunch of ports from WITHOUT_NLS -> ${PORT_OPTIONS:MNLS}bapt2013-04-301-6/+8 * - Convert USE_GETTEXT to USES (part 4)ak2013-04-261-1/+1 * - convert USE_CMAKE to USESmakc2013-03-231-1/+1 * Chase boost updatebapt2013-01-311-7/+3 * - update png to 1.5.10dinoex2012-06-011-1/+1 * Bump PORTREVISION after open-mofit updatemakc2011-05-021-1/+1 * - Get Rid MD5 supportmiwi2011-03-201-2/+0 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-0/+1 * Upgrade to 2010.05.05.thierry2010-05-2412-1391/+500 * - update to 1.4.1dinoex2010-03-281-1/+1 * - update to jpeg-8dinoex2010-02-051-1/+1 * Add conflicts with kicad-develmr2009-10-271-0/+2 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-1/+1 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-0/+1 * - Update boost to 1.39pav2009-07-28