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
This commit is contained in:
Sushma Rai
2006-01-05 13:01:58 +00:00
parent 6f8f1c6d8d
commit 18c2ab5bc8
3 changed files with 26 additions and 8 deletions

View File

@ -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):

View File

@ -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);

View File

@ -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;