aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-contacts.c
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-12-21 14:56:54 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-12-21 14:56:54 +0800
commite0cddfaea0bf8dfb55e5df7f665571a269b5e5e4 (patch)
tree8c7051e70af9ceed61686f7bd8d3d40a8e528810 /plugins/exchange-operations/exchange-contacts.c
parent664f683b703a70945c5cf9ce4afd4d693e5b3cf1 (diff)
downloadgsoc2013-evolution-e0cddfaea0bf8dfb55e5df7f665571a269b5e5e4.tar.gz
gsoc2013-evolution-e0cddfaea0bf8dfb55e5df7f665571a269b5e5e4.tar.zst
gsoc2013-evolution-e0cddfaea0bf8dfb55e5df7f665571a269b5e5e4.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. Fixes #324678. svn path=/trunk/; revision=30913
Diffstat (limited to 'plugins/exchange-operations/exchange-contacts.c')
-rw-r--r--plugins/exchange-operations/exchange-contacts.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c
index ae99fc5566..f04bab9f05 100644
--- a/plugins/exchange-operations/exchange-contacts.c
+++ b/plugins/exchange-operations/exchange-contacts.c
@@ -308,6 +308,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
EABConfigTargetSource *t = (EABConfigTargetSource *) target;
ESource *source = t->source;
gchar *uri_text, *gname, *gruri, *ruri, *path, *path_prefix, *oldpath=NULL;
+ gchar *username, *authtype;
int prefix_len;
ExchangeAccount *account;
ExchangeAccountFolderResult result;
@@ -326,6 +327,9 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
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);
@@ -344,9 +348,14 @@ e_exchange_contacts_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", "plain/password");
path = g_strdup_printf ("/%s", ruri+prefix_len);
-
+
if (!contacts_src_exists) {
/* Create the new folder */
result = exchange_account_create_folder (account, path, "contacts");
@@ -361,7 +370,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
}
else {
/* Nothing happened specific to exchange; just return */
- return;
+ goto done;
}
switch (result) {
@@ -389,6 +398,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
default:
break;
}
+done:
g_free (ruri);
g_free (path);
g_free (oldpath);