[evolution-kolab/ek-wip-porting] CamelIMAPXExtdStore: properly (de)init metadata structure



commit a5cf4b320853430a19e5c86154157cb9808c4773
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Jul 16 11:20:10 2012 +0200

    CamelIMAPXExtdStore: properly (de)init metadata structure
    
    * (de)initialize the CamelImapxMetadata private member
    * this was residing inside the CamelIMAPXExtdServer in
      3.4 and before but has moved to CamelIMAPXExtdStore
      (symmetric to CamelKolabIMAPXStore for the Kolab
      specific part)

 src/libekolab/camel-imapx-extd-store.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-extd-store.c b/src/libekolab/camel-imapx-extd-store.c
index 40126d6..13cfe36 100644
--- a/src/libekolab/camel-imapx-extd-store.c
+++ b/src/libekolab/camel-imapx-extd-store.c
@@ -75,12 +75,17 @@ G_DEFINE_TYPE_WITH_CODE (CamelIMAPXExtdStore,
 static void
 camel_imapx_extd_store_init (CamelIMAPXExtdStore *self)
 {
+	CamelIMAPXExtdStorePrivate *priv = NULL;
 	CamelIMAPXStore *istore = NULL;
 	CamelIMAPXConnManager *cm = NULL;
 
 	g_assert (CAMEL_IS_IMAPX_EXTD_STORE (self));
 
 	istore = CAMEL_IMAPX_STORE (self);
+	priv = CAMEL_IMAPX_EXTD_STORE_PRIVATE (self);
+
+	priv->md = camel_imapx_metadata_new (CAMEL_IMAPX_METADATA_PROTO_INVAL,
+	                                     FALSE);
 
 	/* remove existing conn manager.
 	 * should not normally be necessary
@@ -152,7 +157,14 @@ camel_imapx_extd_store_dispose (GObject *object)
 static void
 camel_imapx_extd_store_finalize (GObject *object)
 {
-	g_assert (CAMEL_IS_IMAPX_EXTD_STORE (object));
+	CamelIMAPXExtdStore *self = NULL;
+	CamelIMAPXExtdStorePrivate *priv = NULL;
+
+	self = CAMEL_IMAPX_EXTD_STORE (object);
+	priv = CAMEL_IMAPX_EXTD_STORE_PRIVATE (self);
+
+	if (priv->md != NULL)
+		camel_imapx_metadata_free (priv->md);
 
 	G_OBJECT_CLASS (camel_imapx_extd_store_parent_class)->finalize (object);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]