Index: addressbook/e-book-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/addressbook/e-book-backend-exchange.c,v
retrieving revision 1.47
diff -u -p -r1.47 e-book-backend-exchange.c
--- addressbook/e-book-backend-exchange.c	21 Dec 2005 06:51:49 -0000	1.47
+++ addressbook/e-book-backend-exchange.c	23 Jan 2006 06:37:46 -0000
@@ -1858,6 +1858,11 @@ e_book_backend_exchange_start_book_view 
 	switch (bepriv->mode) {
 
 	case GNOME_Evolution_Addressbook_MODE_LOCAL:
+		if (!bepriv->marked_for_offline) {
+			e_data_book_view_notify_complete (book_view, 
+					GNOME_Evolution_Addressbook_OfflineUnavailable);
+			return;
+		}
 		if (!bepriv->cache) {
 			e_data_book_view_notify_complete (book_view, 
 					GNOME_Evolution_Addressbook_Success);
@@ -2136,6 +2141,7 @@ e_book_backend_exchange_authenticate_use
 		account = exchange_component_get_account_for_uri (global_exchange_component, NULL);
 		/* FIXME : Check for failures */
 		if (!exchange_account_get_context (account)) {
+			exchange_account_set_online (account);
 			if(!exchange_account_connect (account, password, &result)) {
 				e_data_book_respond_authenticate_user (book, opid, GNOME_Evolution_Addressbook_AuthenticationFailed);
 				return;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.452
diff -u -p -r1.452 ChangeLog
--- ChangeLog	23 Jan 2006 06:36:23 -0000	1.452
+++ ChangeLog	23 Jan 2006 06:49:44 -0000
@@ -1,5 +1,15 @@
 2006-01-23  Sushma Rai  <rsushma@novell.com>
 
+	* addressbook/e-book-backend-exchange.c 
+	(e_book_backend_exchange_start_book_view): Return OfflineUnavailable
+	status in the offline mode if the book is not marked for offline.
+	Fixes #327303, #327318.
+	(e_book_backend_exchange_authenticate_user): In online mode, set the
+	set the mode on ExchangeAccount before connecting. Fixes the issue of
+	not able to access address book on switching to online mode.
+
+2006-01-23  Sushma Rai  <rsushma@novell.com>
+
 	* addressbook/e-book-backend-gal.c (load_source): Return 
 	OfflineUnavailable error code if the mode is offline and GAL is not 
 	marked for offline usage. Fixes #327312.
