aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Cai <jeff.cai@sun.com>2008-02-02 08:57:26 +0800
committerJeff Cai <jeffcai@src.gnome.org>2008-02-02 08:57:26 +0800
commit9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b (patch)
tree428ab4b28eddd39028f03dcf03292044d7645aa3
parent779045e5f8ea2e3c679adc881cb2d3e970a34aa4 (diff)
downloadgsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar.gz
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar.bz2
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar.lz
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar.xz
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.tar.zst
gsoc2013-evolution-9eb2dda183da7d53600be5ce0b9f5dfba4bb5f9b.zip
** Fixes bug #513395
2008-02-02 Jeff Cai <jeff.cai@sun.com> ** Fixes bug #513395 * exchange-account-setup.c: (owa_authenticate_user), (owa_editor_entry_changed), (org_gnome_exchange_owa_url), (org_gnome_exchange_check_options), (org_gnome_exchange_commit): Check parameters before calling camel_url_new svn path=/trunk/; revision=34947
-rw-r--r--plugins/exchange-operations/ChangeLog9
-rw-r--r--plugins/exchange-operations/exchange-account-setup.c28
2 files changed, 30 insertions, 7 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 1e15d41b2c..d74523f7a2 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,12 @@
+2008-02-02 Jeff Cai <jeff.cai@sun.com>
+
+ ** Fixes bug #513395
+
+ * exchange-account-setup.c: (owa_authenticate_user),
+ (owa_editor_entry_changed), (org_gnome_exchange_owa_url),
+ (org_gnome_exchange_check_options), (org_gnome_exchange_commit):
+ Check parameters before calling camel_url_new
+
2008-01-28 Srinivasa Ragavan <sragavan@novell.com>
* exchange-calendar.c: (e_exchange_calendar_commit): Fixes a double
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c
index 7109fccb08..340cdbab99 100644
--- a/plugins/exchange-operations/exchange-account-setup.c
+++ b/plugins/exchange-operations/exchange-account-setup.c
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+/* -*- Mf (id ode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Sushma Rai <rsushma@novell.com>
* Copyright (C) 2004 Novell, Inc.
@@ -437,8 +437,9 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL);
- url = camel_url_new(source_url, NULL);
- if (url->user == NULL) {
+ if (source_url && source_url[0] != '\0')
+ url = camel_url_new(source_url, NULL);
+ if (url && url->user == NULL) {
id_name = e_account_get_string (target_account->account, E_ACCOUNT_ID_ADDRESS);
if (id_name) {
at = strchr(id_name, '@');
@@ -513,7 +514,10 @@ owa_editor_entry_changed(GtkWidget *entry, EConfig *config)
/* NB: we set the button active only if we have a parsable uri entered */
- url = camel_url_new(e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL), NULL);
+ const char * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL);
+ if (target_url && target_url[0] != '\0')
+ url = camel_url_new(target_url, NULL);
+ else url = NULL;
uri = gtk_entry_get_text((GtkEntry *)entry);
if (uri && uri[0]) {
camel_url_set_param(url, "owa_url", uri);
@@ -579,7 +583,10 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data)
target_account = (EMConfigTargetAccount *)data->config->target;
source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL);
- url = camel_url_new(source_url, NULL);
+ if (source_url && source_url[0] != '\0')
+ url = camel_url_new(source_url, NULL);
+ else
+ url = NULL;
if (url == NULL
|| strcmp(url->protocol, "exchange") != 0) {
if (url)
@@ -682,7 +689,11 @@ org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data)
strcmp (data->pageid, "20.receive_options") == 0) {
CamelURL *url;
- url = camel_url_new(e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL), NULL);
+ const char * target_url = e_account_get_string(target->account, E_ACCOUNT_SOURCE_URL);
+ if (target_url && target_url[0] != '\0')
+ url = camel_url_new(target_url, NULL);
+ else
+ url = NULL;
/* Note: we only care about exchange url's, we WILL get called on all other url's too. */
if (url != NULL
&& strcmp(url->protocol, "exchange") == 0
@@ -726,7 +737,10 @@ org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data)
target_account = (EMConfigTargetAccount *)data->config->target;
source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL);
- url = camel_url_new (source_url, NULL);
+ if (source_url && source_url[0] != '\0')
+ url = camel_url_new (source_url, NULL);
+ else
+ url = NULL;
if (url == NULL
|| strcmp (url->protocol, "exchange") != 0) {
if (url)