From 106b05d139f79a88dfb0878157da074830af2904 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 13 Aug 2001 22:17:00 +0000 Subject: We need to be ref'ing the folder if/when we add it to the hash. This may 2001-08-13 Jeffrey Stedfast * 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 --- camel/camel-transport.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'camel/camel-transport.c') 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; } -- cgit v1.2.3