From: Sergio Villar Senin Date: Wed, 9 Apr 2008 11:40:32 +0000 (+0000) Subject: * Fixed a warning+critical when finalizing X-Git-Tag: git_migration_finished~1489 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=1be0ccc3a043804aa8abe22d581b79cbf700d477 * Fixed a warning+critical when finalizing * Do not call tny_account_set_id twice when creating accounts pmo-trunk-r4387 --- diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 99cbaf7..2f5ebbe 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -301,8 +301,11 @@ account_disconnect (TnyAccount *account) { g_return_if_fail (account && TNY_IS_ACCOUNT(account)); - if (modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (account))) - tny_camel_account_set_online (TNY_CAMEL_ACCOUNT(account), FALSE, NULL, NULL); + if (TNY_IS_STORE_ACCOUNT (account) && + !modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (account))) + return; + + tny_camel_account_set_online (TNY_CAMEL_ACCOUNT(account), FALSE, NULL, NULL); } diff --git a/src/modest-tny-account.c b/src/modest-tny-account.c index 2496a16..7e620ec 100644 --- a/src/modest-tny-account.c +++ b/src/modest-tny-account.c @@ -274,7 +274,10 @@ update_tny_account (TnyAccount *tny_account, g_return_val_if_fail (account_name, FALSE); g_return_val_if_fail (tny_account, FALSE); - tny_account_set_id (tny_account, account_name); + /* Do not change the id if it's not needed */ + if (tny_account_get_id (tny_account) && + strcmp (tny_account_get_id (tny_account), account_name)) + tny_account_set_id (tny_account, account_name); /* mbox and maildir accounts use a URI instead of the rest: * Note that this is not where we create the special local folders account.