[empathy/gnome-2-34] Only add the 'extra-certificate-identities' parameter if gabble supports it.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-2-34] Only add the 'extra-certificate-identities' parameter if gabble supports it.
- Date: Tue, 22 Mar 2011 15:17:20 +0000 (UTC)
commit d5ee1dea31080835f3c1ca091c58769fc989b037
Author: Stef Walter <stefw collabora co uk>
Date: Tue Mar 22 16:08:34 2011 +0100
Only add the 'extra-certificate-identities' parameter if gabble supports it.
libempathy/empathy-account-settings.c | 7 +++++++
libempathy/empathy-account-settings.h | 4 ++++
src/empathy-account-assistant.c | 10 +++++++---
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 2a9afab..fccc58e 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -756,6 +756,13 @@ empathy_account_settings_get_tp_param (EmpathyAccountSettings *settings,
return NULL;
}
+gboolean
+empathy_account_settings_have_tp_param (EmpathyAccountSettings *settings,
+ const gchar *param)
+{
+ return (empathy_account_settings_get_tp_param (settings, param) != NULL);
+}
+
static void
account_settings_remove_from_unset (EmpathyAccountSettings *settings,
const gchar *param)
diff --git a/libempathy/empathy-account-settings.h b/libempathy/empathy-account-settings.h
index 3a2264e..e02854a 100644
--- a/libempathy/empathy-account-settings.h
+++ b/libempathy/empathy-account-settings.h
@@ -83,6 +83,10 @@ gboolean empathy_account_settings_has_account (
TpConnectionManagerParam *empathy_account_settings_get_tp_params (
EmpathyAccountSettings *settings);
+gboolean empathy_account_settings_have_tp_param (
+ EmpathyAccountSettings *settings,
+ const gchar *param);
+
void empathy_account_settings_unset (EmpathyAccountSettings *settings,
const gchar *param);
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 4beda4b..e84fa65 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -422,7 +422,7 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
"talkx.l.google.com:80",
NULL};
- gchar *extra_identities[] = {
+ gchar *extra_certificate_identities[] = {
"talk.google.com",
NULL};
@@ -432,8 +432,12 @@ account_assistant_protocol_changed_cb (GtkComboBox *chooser,
empathy_account_settings_set_strv (settings, "fallback-servers",
fallback_servers);
- empathy_account_settings_set_strv (settings, "extra-identities",
- extra_identities);
+ if (empathy_account_settings_have_tp_param (settings,
+ "extra-certificate-identities"))
+ {
+ empathy_account_settings_set_strv (settings,
+ "extra-certificate-identities", extra_certificate_identities);
+ }
}
else if (is_facebook)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]