From 4199f9384f184abe0c33d0fc96805348e5664aed Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Sun, 30 Dec 2007 18:43:31 +0000 Subject: Patch from Sushma Rai : Fix for bug #327965 (Set the e-source property username with the domain, if the domain is specified) svn path=/trunk/; revision=34739 --- plugins/exchange-operations/ChangeLog | 8 ++++++++ plugins/exchange-operations/exchange-calendar.c | 13 +++++++++++-- plugins/exchange-operations/exchange-contacts.c | 13 +++++++++++-- 3 files changed, 30 insertions(+), 4 deletions(-) (limited to 'plugins/exchange-operations') diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 2e4510aa08..d67804b685 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,11 @@ +2007-12-31 Sushma Rai + + ** Fixes bug #327965 + + * exchange-calendar.c (e_exchange_calendar_commit): + * exchange-contacts.c (e_exchange_contacts_commit): Setting the + e-source property username with domain if the domain is specified. + 2007-12-20 Matthew Barnes ** Fixes part of bug #362638 diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c index 0783770361..dda1acac99 100644 --- a/plugins/exchange-operations/exchange-calendar.c +++ b/plugins/exchange-operations/exchange-calendar.c @@ -370,7 +370,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; + gchar *username, *windows_domain, *authtype; int prefix_len; ExchangeAccount *account; ExchangeAccountFolderResult result; @@ -394,7 +394,13 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target) if (!is_exchange_personal_folder (account, uri_text)) return; - username = exchange_account_get_username (account); + windows_domain = exchange_account_get_windows_domain (account); + if (windows_domain) + username = g_strdup_printf ("%s\\%s", windows_domain, + exchange_account_get_username (account)); + else + username = g_strdup (exchange_account_get_username (account)); + authtype = exchange_account_get_authtype (account); path_prefix = g_strconcat (account->account_filename, "/;", NULL); @@ -510,6 +516,9 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target) done: g_free (uri_text); + g_free (username); + if (authtype) + g_free (authtype); g_free (ruri); g_free (path); g_free (ftype); diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c index 147bf1fe14..a906bea5d1 100644 --- a/plugins/exchange-operations/exchange-contacts.c +++ b/plugins/exchange-operations/exchange-contacts.c @@ -401,7 +401,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) EABConfigTargetSource *t = (EABConfigTargetSource *) target; ESource *source = t->source; gchar *uri_text, *gname, *gruri, *ruri = NULL, *path = NULL, *path_prefix, *oldpath=NULL; - gchar *username, *authtype; + gchar *username, *windows_domain, *authtype; int prefix_len; ExchangeAccount *account; ExchangeAccountFolderResult result; @@ -426,7 +426,13 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) if (!is_exchange_personal_folder (account, uri_text)) return; - username = exchange_account_get_username (account); + windows_domain = exchange_account_get_windows_domain (account); + if (windows_domain) + username = g_strdup_printf ("%s\\%s", windows_domain, + exchange_account_get_username (account)); + else + username = g_strdup (exchange_account_get_username (account)); + authtype = exchange_account_get_authtype (account); path_prefix = g_strconcat (account->account_filename, "/;", NULL); @@ -519,6 +525,9 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target) } done: g_free (ruri); + g_free (username); + if (authtype) + g_free (authtype); g_free (path); g_free (oldpath); g_free (contacts_old_src_uri); -- cgit v1.2.3