[evolution-kolab/ek-wip-porting-imapx: 3/7] CamelIMAPXExtdStore: close ConnManager connections before unref



commit 91a3ba43a85ff76db4cea977cd4daa3f8c797509
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri Feb 3 14:49:38 2012 +0100

    CamelIMAPXExtdStore: close ConnManager connections before unref
    
    * in the object init function, make sure pending
      connections in the parent are closed before
      unref()ing the upstream ConnManager and replacing
      it with our own variant (CamelIMAPXExtdConnManager)

 src/camel/providers/imapx/camel-imapx-extd-store.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-extd-store.c b/src/camel/providers/imapx/camel-imapx-extd-store.c
index 323c929..69a4d3b 100644
--- a/src/camel/providers/imapx/camel-imapx-extd-store.c
+++ b/src/camel/providers/imapx/camel-imapx-extd-store.c
@@ -86,8 +86,10 @@ camel_imapx_extd_store_init (CamelIMAPXExtdStore *self)
 	 * to override the respective parent class functions
 	 */
 	istore = CAMEL_IMAPX_STORE (self);
-	if (istore->con_man != NULL)
+	if (istore->con_man != NULL) {
+		camel_imapx_conn_manager_close_connections (istore->con_man);
 		g_object_unref (istore->con_man);
+	}
 	cm = camel_imapx_extd_conn_manager_new (self);
 	istore->con_man = CAMEL_IMAPX_CONN_MANAGER (cm);
 }



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