[evolution-ews/gnome-2-28: 4/6] Initialize the exception before use



commit 2c217047bf8e20c0995875e1444a612d96dab1ba
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Thu Aug 11 08:39:09 2011 +0530

    Initialize the exception before use

 src/camel/camel-ews-store.c  |    2 ++
 src/utils/ews-camel-compat.c |   10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 27cf60e..654b947 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -113,6 +113,7 @@ ews_store_construct	(CamelService *service, CamelSession *session,
 
 	/* Chain up to parent's construct() method. */
 	service_class = CAMEL_SERVICE_CLASS (parent_class);
+	camel_exception_init (&ex);
 	service_class->construct (service, session, provider, url, &ex);
 
 	if (camel_exception_is_set (&ex)) {
@@ -245,6 +246,7 @@ ews_disconnect_sync (CamelService *service, gboolean clean, EVO3(GCancellable *c
 	CamelException ex;
 
 	service_class = CAMEL_SERVICE_CLASS (parent_class);
+	camel_exception_init (&ex);
 	if (!service_class->EVO3_sync(disconnect) (service, clean, EVO3(cancellable,) &ex)) {
 		ews_compat_propagate_exception_to_gerror (&ex, error);
 		return FALSE;
diff --git a/src/utils/ews-camel-compat.c b/src/utils/ews-camel-compat.c
index a63fbd0..3edb001 100644
--- a/src/utils/ews-camel-compat.c
+++ b/src/utils/ews-camel-compat.c
@@ -56,7 +56,8 @@ camel_data_cache_get_filename_compat	(CamelDataCache *cdc,
 #else
 	CamelException ex;
 	gchar *ret;
-
+	
+	camel_exception_init (&ex);
 	ret = camel_data_cache_get_filename (cdc, path, key, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	
@@ -74,6 +75,7 @@ camel_data_cache_new_compat	(const gchar *path,
 	CamelException ex;
 	CamelDataCache *ret;
 
+	camel_exception_init (&ex);
 	ret = camel_data_cache_new (path, 0, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	
@@ -93,6 +95,7 @@ camel_data_cache_get_compat	(CamelDataCache *cdc,
 	CamelException ex;
 	CamelStream *ret;
 
+	camel_exception_init (&ex);
 	ret = camel_data_cache_get (cdc, path, key, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	
@@ -112,6 +115,7 @@ camel_folder_search_search_compat	(CamelFolderSearch *search,
 	CamelException ex;
 	GPtrArray *ret;
 
+	camel_exception_init (&ex);
 	ret = camel_folder_search_search (search, expr, uids, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	
@@ -130,6 +134,7 @@ camel_folder_search_count_compat	(CamelFolderSearch *search,
 	CamelException ex;
 	guint32 ret;
 
+	camel_exception_init (&ex);
 	ret = camel_folder_search_count (search, expr, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	
@@ -149,6 +154,7 @@ camel_session_get_storage_path_compat	(CamelSession *session,
 	CamelException ex;
 	gchar *ret;
 
+	camel_exception_init (&ex);
 	ret = camel_session_get_storage_path (session, service, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	return ret;
@@ -170,6 +176,7 @@ camel_session_get_password_compat	(CamelSession *session,
 	CamelException ex;
 	gchar *ret;
 
+	camel_exception_init (&ex);
 	ret = camel_session_get_password (session, service, domain, prompt, item, flags, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	return ret;
@@ -188,6 +195,7 @@ camel_service_connect_compat	(CamelService *service,
 	CamelException ex;
 	gboolean ret;
 	
+	camel_exception_init (&ex);
 	ret = camel_service_connect (service, &ex);
 	ews_compat_propagate_exception_to_gerror (&ex, error);
 	return ret;



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