aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-calendar.c
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 /plugins/exchange-operations/exchange-calendar.c
parent6f8f1c6d8d3a6f46e461352a93b6676d2871a1b4 (diff)
downloadgsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.gz
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.bz2
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.lz
gsoc2013-evolution-18c2ab5bc837295bcffae9bcc6bfcd05e6c9beb2.tar.xz
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
Diffstat (limited to 'plugins/exchange-operations/exchange-calendar.c')
-rw-r--r--plugins/exchange-operations/exchange-calendar.c16
1 files changed, 13 insertions, 3 deletions
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);