aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-01-18 16:52:21 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-01-18 16:52:21 +0800
commit23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa (patch)
tree8001b38a5496870d6c34801399df88e1be76bd2d
parent0d1b87cd9c372548d428cebaa5f5ebda3a4890cb (diff)
downloadgsoc2013-evolution-23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa.tar.gz
gsoc2013-evolution-23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa.tar.zst
gsoc2013-evolution-23694d6f4514a90de3b7fd668c05f5d6cd5ec5fa.zip
Initializing host name with a dummy name
svn path=/trunk/; revision=28431
-rw-r--r--plugins/exchange-account-setup/ChangeLog6
-rw-r--r--plugins/exchange-account-setup/exchange-ask-password.c18
2 files changed, 21 insertions, 3 deletions
diff --git a/plugins/exchange-account-setup/ChangeLog b/plugins/exchange-account-setup/ChangeLog
index 40ae5c72ee..286e029728 100644
--- a/plugins/exchange-account-setup/ChangeLog
+++ b/plugins/exchange-account-setup/ChangeLog
@@ -1,5 +1,11 @@
2005-01-18 Sushma Rai <rsushma@novell.com>
+ * exchange-ask-password.c (org_gnome_exchange_read_url):
+ Setting dummy host name, which will be reset to proper
+ hostname once the user is authenticated.
+
+2005-01-18 Sushma Rai <rsushma@novell.com>
+
* org-gnome-exchange-account-setup.eplug.in: Moved two account
editor plugins unser same hook class.
diff --git a/plugins/exchange-account-setup/exchange-ask-password.c b/plugins/exchange-account-setup/exchange-ask-password.c
index 5f1d6b283e..a70b23ddef 100644
--- a/plugins/exchange-account-setup/exchange-ask-password.c
+++ b/plugins/exchange-account-setup/exchange-ask-password.c
@@ -82,7 +82,6 @@ validate_exchange_user (void *data)
E_ACCOUNT_SOURCE_URL);
account_url = g_strdup (source_url);
provider = camel_provider_get (account_url, NULL);
- g_free (account_url); account_url = NULL;
if (!provider) {
return FALSE; /* This should never happen */
}
@@ -104,6 +103,7 @@ validate_exchange_user (void *data)
E_ACCOUNT_TRANSPORT_URL, url_string);
}
camel_url_free (url);
+ g_free (account_url);
return valid;
}
@@ -164,9 +164,10 @@ org_gnome_exchange_read_url(EPlugin *epl, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
EConfig *config;
- char *account_url = NULL, *exchange_url = NULL;
+ char *account_url = NULL, *exchange_url = NULL, *temp_url;
const char *source_url;
GtkWidget *owa_entry = NULL, *parent;
+ CamelURL *url;
config = data->config;
target_account = (EMConfigTargetAccount *)data->config->target;
@@ -175,14 +176,25 @@ org_gnome_exchange_read_url(EPlugin *epl, EConfigHookItemFactoryData *data)
E_ACCOUNT_SOURCE_URL);
account_url = g_strdup (source_url);
exchange_url = g_strrstr (account_url, "exchange");
- g_free (account_url);
if (exchange_url) {
if (data->old)
return data->old;
+ /* hack for making page check work when host is not there */
+ url = camel_url_new_with_base (NULL, account_url);
+ if (url->host == NULL) {
+ camel_url_set_host (url, "localhost");
+ temp_url = camel_url_to_string (url, 0);
+ e_account_set_string (target_account->account,
+ E_ACCOUNT_SOURCE_URL, temp_url);
+ g_free (temp_url);
+ }
+ camel_url_free (url);
+
parent = data->parent;
owa_entry = add_owa_entry (parent, config, target_account);
}
+ g_free (account_url);
return owa_entry;
}