evolution-data-server r9575 - branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi



Author: msuman
Date: Mon Sep 22 06:41:38 2008
New Revision: 9575
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9575&view=rev

Log:
MAPI: Store profile name in private structure, use it for authentication.

Modified:
   branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi/ChangeLog
   branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi/e-cal-backend-mapi.c

Modified: branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi/e-cal-backend-mapi.c
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi/e-cal-backend-mapi.c	(original)
+++ branches/EXCHANGE_MAPI_BRANCH/calendar/backends/mapi/e-cal-backend-mapi.c	Mon Sep 22 06:41:38 2008
@@ -57,6 +57,7 @@
 struct _ECalBackendMAPIPrivate {
 	mapi_id_t 		fid;
 	uint32_t 		olFolder;
+	gchar 			*profile; 
 
 	/* These fields are entirely for access rights */
 	gchar 			*owner_name;
@@ -104,7 +105,7 @@
 	cbmapi = E_CAL_BACKEND_MAPI (backend);
 	priv = cbmapi->priv;
 
-	if (authenticated || exchange_mapi_connection_exists () || exchange_mapi_connection_new (priv->user_email, NULL)) {
+	if (authenticated || exchange_mapi_connection_exists () || exchange_mapi_connection_new (priv->profile, priv->password)) {
 		authenticated = TRUE;
 		return GNOME_Evolution_Calendar_Success;
 	} else { 
@@ -182,6 +183,11 @@
 		priv->password = NULL;
 	}
 
+	if (priv->profile) {
+		g_free (priv->profile);
+		priv->profile = NULL;
+	}
+
 	if (priv->user_name) {
 		g_free (priv->user_name);
 		priv->user_name = NULL;
@@ -1121,6 +1127,7 @@
 	priv->username = g_strdup (username);
 	priv->password = g_strdup (password);
 
+	priv->profile = g_strdup (e_source_get_property (esource, "profile"));
 	priv->user_name = g_strdup (e_source_get_property (esource, "acl-user-name"));
 	priv->user_email = g_strdup (e_source_get_property (esource, "acl-user-email"));
 	priv->owner_name = g_strdup (e_source_get_property (esource, "acl-owner-name"));



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