[empathy] 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] Only add the 'extra-certificate-identities' parameter if gabble supports it.
- Date: Tue, 22 Mar 2011 14:43:36 +0000 (UTC)
commit 6c943efd9aabd9d0d8674c3c58d2e58efdb412f6
Author: Stef Walter <stefw collabora co uk>
Date: Mon Mar 21 10:58:31 2011 +0100
Only add the 'extra-certificate-identities' parameter if gabble supports it.
libempathy-gtk/empathy-protocol-chooser.c | 8 ++++++--
libempathy/empathy-account-settings.c | 7 +++++++
libempathy/empathy-account-settings.h | 4 ++++
3 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 9bbab1c..b2e4314 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -604,8 +604,12 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self)
empathy_account_settings_set_strv (settings, "fallback-servers",
fallback_servers);
- empathy_account_settings_set_strv (settings,
- "extra-certificate-identities", extra_certificate_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 (!tp_strdiff (service, "facebook"))
{
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 0db28d7..4005d27 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -798,6 +798,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 fb2b8f4..25f1d31 100644
--- a/libempathy/empathy-account-settings.h
+++ b/libempathy/empathy-account-settings.h
@@ -87,6 +87,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]