From f7780399f460eb357653f02a243c7347d40bc35e Mon Sep 17 00:00:00 2001 From: Arunprakash Date: Thu, 25 Aug 2005 15:27:51 +0000 Subject: Need to set the account's linestatus to online as there is no way to get 2005-08-25 Arunprakash * exchange-config-listener.c (account_added) : Need to set the account's linestatus to online as there is no way to get the linestatus in plugin. Also moved the authentication code to exchange_operations_get_exchange_account as it is not needed here. * exchange-operations.c (exchange_operations_get_exchange_account) : Updated to return the account in offline mode. svn path=/trunk/; revision=30251 --- plugins/exchange-operations/exchange-operations.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'plugins/exchange-operations/exchange-operations.c') diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c index 64d3d8da09..b804c47102 100644 --- a/plugins/exchange-operations/exchange-operations.c +++ b/plugins/exchange-operations/exchange-operations.c @@ -186,17 +186,28 @@ exchange_operations_get_exchange_account (void) ExchangeAccount *account = NULL; ExchangeAccountResult result; GSList *acclist; + gint mode; acclist = exchange_config_listener_get_accounts (exchange_global_config_listener); /* FIXME: Need to be changed for handling multiple accounts */ if (acclist) { account = acclist->data; - if (exchange_account_get_context (account)) + exchange_config_listener_get_offline_status (exchange_global_config_listener, + &mode); + + if (mode == OFFLINE_MODE) { + return account; + } + else if (exchange_account_get_context (account)) { return account; - else { + } else { /* Try authenticating */ result = exchange_config_listener_authenticate(exchange_global_config_listener, account); + if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS) { + exchange_operations_report_error (account, result); + return NULL; + } if (exchange_account_get_context (account)) return account; } -- cgit v1.2.3