aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-transport.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-14 06:17:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-14 06:17:00 +0800
commit106b05d139f79a88dfb0878157da074830af2904 (patch)
treef595d6c03ea6dde32e21c726026cca7581ab0736 /camel/camel-transport.c
parent681cee1a1d0000f865f96624299afc917975bc45 (diff)
downloadgsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.tar.gz
gsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.tar.zst
gsoc2013-evolution-106b05d139f79a88dfb0878157da074830af2904.zip
We need to be ref'ing the folder if/when we add it to the hash. This may
2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? svn path=/trunk/; revision=11968
Diffstat (limited to 'camel/camel-transport.c')
-rw-r--r--camel/camel-transport.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
index 0338f5dcc0..b4d78c8d74 100644
--- a/camel/camel-transport.c
+++ b/camel/camel-transport.c
@@ -39,7 +39,7 @@ static void
camel_transport_init (gpointer object, gpointer klass)
{
CamelTransport *xport = object;
-
+
xport->priv = g_malloc0 (sizeof (struct _CamelTransportPrivate));
#ifdef ENABLE_THREADS
xport->priv->send_lock = g_mutex_new ();
@@ -60,19 +60,20 @@ camel_transport_finalize (CamelObject *object)
CamelType
camel_transport_get_type (void)
{
- static CamelType camel_transport_type = CAMEL_INVALID_TYPE;
+ static CamelType type = CAMEL_INVALID_TYPE;
- if (camel_transport_type == CAMEL_INVALID_TYPE) {
- camel_transport_type = camel_type_register (CAMEL_SERVICE_TYPE, "CamelTransport",
- sizeof (CamelTransport),
- sizeof (CamelTransportClass),
- NULL,
- NULL,
- (CamelObjectInitFunc) camel_transport_init,
- (CamelObjectFinalizeFunc) camel_transport_finalize);
+ if (type == CAMEL_INVALID_TYPE) {
+ type = camel_type_register (CAMEL_SERVICE_TYPE,
+ "CamelTransport",
+ sizeof (CamelTransport),
+ sizeof (CamelTransportClass),
+ NULL,
+ NULL,
+ (CamelObjectInitFunc) camel_transport_init,
+ (CamelObjectFinalizeFunc) camel_transport_finalize);
}
- return camel_transport_type;
+ return type;
}