evolution-data-server r9257 - trunk/camel



Author: sragavan
Date: Mon Aug  4 17:29:32 2008
New Revision: 9257
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9257&view=rev

Log:
2008-08-04  Srinivasa Ragavan  <sragavan novell com>

	** Fix for bug #546194

	* camel/camel-folder.c: Use the right path for spool a/c
	* camel/camel-store.c: Use the right path for spool a/c


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-folder.c
   trunk/camel/camel-store.c

Modified: trunk/camel/camel-folder.c
==============================================================================
--- trunk/camel/camel-folder.c	(original)
+++ trunk/camel/camel-folder.c	Mon Aug  4 17:29:32 2008
@@ -272,15 +272,26 @@
 		g_free (store_path);
 	}
 
-
 	folder->cdb = camel_db_open (store_db_path, &ex);
-	g_free (store_db_path);
-	
 	if (camel_exception_is_set (&ex)) {
-		g_print ("Exiting without success for stire_db_path : [%s]: %s\n", store_db_path, camel_exception_get_description(&ex));
+		char *store_path;
+		
+		g_print ("Failure for store_db_path : [%s]\n", store_db_path);
+		g_free (store_db_path);		
+
+		store_path =   camel_session_get_storage_path ((CamelSession *)camel_service_get_session (service), service, &ex);
+		store_db_path = g_build_filename (store_path, CAMEL_DB_FILE, NULL);
+		g_free (store_path);
 		camel_exception_clear(&ex);
-		return;
-	}	
+		folder->cdb = camel_db_open (store_db_path, &ex);
+		if (camel_exception_is_set (&ex)) {
+			g_print("Retry with %s failed\n", store_db_path);
+			g_free(store_db_path);
+			camel_exception_clear(&ex);
+			return;
+		}
+	}
+	g_free (store_db_path);
 }
 
 

Modified: trunk/camel/camel-store.c
==============================================================================
--- trunk/camel/camel-store.c	(original)
+++ trunk/camel/camel-store.c	Mon Aug  4 17:29:32 2008
@@ -230,9 +230,22 @@
 	store->cdb = camel_db_open (store_db_path, ex);
 	printf("store_db_path %s\n", store_db_path);
 	if (camel_exception_is_set (ex)) {
-		g_print ("Exiting without success for store_db_path : [%s]\n", store_db_path);
-		g_free (store_db_path);
-		return;
+		char *store_path;
+		
+		g_print ("Failure for store_db_path : [%s]\n", store_db_path);
+		g_free (store_db_path);		
+
+		store_path =  camel_session_get_storage_path (session, service, ex);
+		store_db_path = g_build_filename (store_path, CAMEL_DB_FILE, NULL);
+		g_free (store_path);
+		camel_exception_clear(ex);
+		store->cdb = camel_db_open (store_db_path, ex);
+		if (camel_exception_is_set (ex)) {
+			g_print("Retry with %s failed\n", store_db_path);
+			g_free(store_db_path);
+			camel_exception_clear(ex);
+			return;
+		}
 	}
 	g_free (store_db_path);
 



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