aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-01-05 21:01:58 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-01-05 21:01:58 +0800
commit18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2 (patch)
tree70642784ae4bc59a7ce132c598968c55b72ac6be
parent6f8f1c6d8d3a6f46e461352a93b6676d2871a1b4 (diff)
downloadgsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.gz
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.zst
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.zip
Setting the username, authtype, auth-domain and auth properties on the esource
created, so that corresponding folder will be authenticated and loaded after the folder creation. Also fixed memory leak in case of no any changes condition. Not freeing the non allocated string offline_mode. svn path=/trunk/; revision=31064
-rw-r--r--plugins/exchange-operations/ChangeLog11
-rw-r--r--plugins/exchange-operations/exchange-calendar.c16
-rw-r--r--plugins/exchange-operations/exchange-config-listener.c7
3 files changed, 26 insertions, 8 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index f0fe72418c..71f5796129 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,14 @@
+2006-01-05 Sushma Rai <rsushma@novell.com>
+
+ * exchange-calendar.c (e_exchange_calendar_commit): Setting the
+ username, authtype, auth-domain and auth properties on the esource
+ created, so that corresponding folder will be authenticated and loaded
+ after the folder creation. Also fixed memory leak in case of no any
+ changes condition.
+
+ * exchange-config-listener.c (remove_selected_non_offline_esources):
+ Not freeing the non allocated string offline_mode.
+
2006-01-02 Sushma Rai <rsushma@novell.com>
* exchange-folder-permission.c (org_gnome_exchange_folder_permissions):
diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c
index 0117e18af7..8b87150487 100644
--- a/plugins/exchange-operations/exchange-calendar.c
+++ b/plugins/exchange-operations/exchange-calendar.c
@@ -323,6 +323,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
ECalConfigTargetSource *t = (ECalConfigTargetSource *) target;
ESource *source = t->source;
gchar *uri_text, *gruri, *gname, *ruri, *ftype, *path, *path_prefix, *oldpath=NULL;
+ gchar *username, *authtype;
int prefix_len;
ExchangeAccount *account;
ExchangeAccountFolderResult result;
@@ -335,11 +336,14 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
return ;
}
- status = exchange_is_offline (&offline_status);
+ status = exchange_is_offline (&offline_status);
if (offline_status == OFFLINE_MODE || status != CONFIG_LISTENER_STATUS_OK)
return;
account = exchange_operations_get_exchange_account ();
+ username = exchange_account_get_username (account);
+ authtype = exchange_account_get_authtype (account);
+
path_prefix = g_strconcat (account->account_filename, "/;", NULL);
prefix_len = strlen (path_prefix);
g_free (path_prefix);
@@ -370,6 +374,11 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
ruri = g_strconcat (gruri, "/", gname, NULL);
}
e_source_set_relative_uri (source, ruri);
+ e_source_set_property (source, "username", username);
+ e_source_set_property (source, "auth-domain", "Exchange");
+ if (authtype)
+ e_source_set_property (source, "auth-type", authtype);
+ e_source_set_property (source, "auth", "1");
path = g_build_filename ("/", ruri+prefix_len, NULL);
@@ -387,7 +396,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
}
else {
/* Nothing happened specific to exchange; just return */
- return;
+ goto done;
}
switch (result) {
@@ -415,7 +424,8 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
default:
break;
}
-
+
+done:
g_free (uri_text);
g_free (ruri);
g_free (path);
diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c
index beb19a110f..d83458ef24 100644
--- a/plugins/exchange-operations/exchange-config-listener.c
+++ b/plugins/exchange-operations/exchange-config-listener.c
@@ -1143,7 +1143,7 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon
const char *source_uid;
GConfClient *client;
ESourceList *source_list = NULL;
- char *offline_mode=NULL;
+ const char *offline_mode=NULL;
char *selected_gconf_key;
@@ -1179,8 +1179,7 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon
selected_gconf_key,
GCONF_VALUE_STRING, NULL);
if (ids) {
- offline_mode = (gchar*) e_source_get_property (source,
- "offline_sync");
+ offline_mode = e_source_get_property (source, "offline_sync");
if (!offline_mode ||
(offline_mode && strcmp (offline_mode, "1"))) {
while ((node_to_be_deleted =
@@ -1197,8 +1196,6 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon
}
g_slist_foreach (ids, (GFunc) g_free, NULL);
g_slist_free (ids);
- g_free (offline_mode);
-
}
}
found_group = TRUE;