[telepathy-gabble/f18] Fix FD #56181

Debarshi Ray rishi at fedoraproject.org
Wed Oct 24 17:13:26 UTC 2012


commit c461fc646bae7e683bd1db98cacaebe627df9e09
Author: Debarshi Ray <debarshir at gnome.org>
Date:   Wed Oct 24 19:13:22 2012 +0200

    Fix FD #56181

 ...Don-t-reset-the-capabilities-in-UpdateCap.patch |  129 ++++++++++++++++++++
 telepathy-gabble.spec                              |    7 +-
 2 files changed, 135 insertions(+), 1 deletions(-)
---
diff --git a/0001-connection-Don-t-reset-the-capabilities-in-UpdateCap.patch b/0001-connection-Don-t-reset-the-capabilities-in-UpdateCap.patch
new file mode 100644
index 0000000..4f5174d
--- /dev/null
+++ b/0001-connection-Don-t-reset-the-capabilities-in-UpdateCap.patch
@@ -0,0 +1,129 @@
+From c9a20566997b716f68390e9dff250c148828ab58 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <rishi at gnu.org>
+Date: Fri, 19 Oct 2012 16:17:35 +0200
+Subject: [PATCH] connection: Don't reset the capabilities in
+ UpdateCapabilities
+
+This ensures that a running Gabble process will always create Call1
+channels once it has seen such a client in its lifetime.
+
+Remove gabble_caps_channel_manager_reset_capabilities and its
+implementation in GabbleMediaFactory, since it is not used anymore.
+
+Fixes: https://bugs.freedesktop.org/56181
+---
+ gabble/caps-channel-manager.h |  3 ---
+ src/caps-channel-manager.c    | 15 ---------------
+ src/connection.c              | 15 ++-------------
+ src/media-factory.c           |  9 ---------
+ 4 files changed, 2 insertions(+), 40 deletions(-)
+
+diff --git a/gabble/caps-channel-manager.h b/gabble/caps-channel-manager.h
+index 9442476..a41bd20 100644
+--- a/gabble/caps-channel-manager.h
++++ b/gabble/caps-channel-manager.h
+@@ -73,9 +73,6 @@ typedef void (*GabbleCapsChannelManagerRepresentClientFunc) (
+     GabbleCapabilitySet *cap_set,
+     GPtrArray *data_forms);
+ 
+-void gabble_caps_channel_manager_reset_capabilities (
+-    GabbleCapsChannelManager *caps_manager);
+-
+ void gabble_caps_channel_manager_get_contact_capabilities (
+     GabbleCapsChannelManager *caps_manager,
+     TpHandle handle,
+diff --git a/src/caps-channel-manager.c b/src/caps-channel-manager.c
+index dea13a6..135427a 100644
+--- a/src/caps-channel-manager.c
++++ b/src/caps-channel-manager.c
+@@ -42,21 +42,6 @@ gabble_caps_channel_manager_default_init (
+ 
+ /* Virtual-method wrappers */
+ void
+-gabble_caps_channel_manager_reset_capabilities (
+-    GabbleCapsChannelManager *caps_manager)
+-{
+-  GabbleCapsChannelManagerInterface *iface =
+-    GABBLE_CAPS_CHANNEL_MANAGER_GET_INTERFACE (caps_manager);
+-  GabbleCapsChannelManagerResetCapsFunc method = iface->reset_caps;
+-
+-  if (method != NULL)
+-    {
+-      method (caps_manager);
+-    }
+-  /* ... else assume there is no need to reset the caps */
+-}
+-
+-void
+ gabble_caps_channel_manager_get_contact_capabilities (
+     GabbleCapsChannelManager *caps_manager,
+     TpHandle handle,
+diff --git a/src/connection.c b/src/connection.c
+index 5ea0d1a..e53b3de 100644
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -3368,25 +3368,12 @@ gabble_connection_update_capabilities (
+   GabbleConnection *self = GABBLE_CONNECTION (iface);
+   TpBaseConnection *base = (TpBaseConnection *) self;
+   GabbleCapabilitySet *old_caps = NULL;
+-  TpChannelManagerIter iter;
+-  TpChannelManager *manager;
+   guint i;
+ 
+   /* Now that someone has told us our *actual* capabilities, we can stop
+    * advertising spurious caps in initial presence */
+   gabble_capability_set_clear (self->priv->bonus_caps);
+ 
+-  tp_base_connection_channel_manager_iter_init (&iter, base);
+-
+-  while (tp_base_connection_channel_manager_iter_next (&iter, &manager))
+-    {
+-      if (GABBLE_IS_CAPS_CHANNEL_MANAGER (manager))
+-        {
+-          gabble_caps_channel_manager_reset_capabilities (
+-              GABBLE_CAPS_CHANNEL_MANAGER (manager));
+-        }
+-    }
+-
+   DEBUG ("enter");
+ 
+   for (i = 0; i < clients->len; i++)
+@@ -3397,6 +3384,8 @@ gabble_connection_update_capabilities (
+       const gchar * const * cap_tokens = g_value_get_boxed (va->values + 2);
+       GabbleCapabilitySet *cap_set;
+       GPtrArray *data_forms;
++      TpChannelManagerIter iter;
++      TpChannelManager *manager;
+ 
+       g_hash_table_remove (self->priv->client_caps, client_name);
+       g_hash_table_remove (self->priv->client_data_forms, client_name);
+diff --git a/src/media-factory.c b/src/media-factory.c
+index 493a817..8f3e397 100644
+--- a/src/media-factory.c
++++ b/src/media-factory.c
+@@ -1124,14 +1124,6 @@ _gabble_media_factory_typeflags_to_caps (TpChannelMediaCapabilities flags,
+ }
+ 
+ static void
+-gabble_media_factory_reset_caps (GabbleCapsChannelManager *manager)
+-{
+-  GabbleMediaFactory *self = GABBLE_MEDIA_FACTORY (manager);
+-
+-  self->priv->use_call_channels = FALSE;
+-}
+-
+-static void
+ gabble_media_factory_get_contact_caps (GabbleCapsChannelManager *manager,
+     TpHandle handle,
+     const GabbleCapabilitySet *caps,
+@@ -1342,7 +1334,6 @@ caps_channel_manager_iface_init (gpointer g_iface,
+ {
+   GabbleCapsChannelManagerInterface *iface = g_iface;
+ 
+-  iface->reset_caps = gabble_media_factory_reset_caps;
+   iface->get_contact_caps = gabble_media_factory_get_contact_caps;
+   iface->represent_client = gabble_media_factory_represent_client;
+ }
+-- 
+1.7.12.1
+
diff --git a/telepathy-gabble.spec b/telepathy-gabble.spec
index 4d98a61..d279b5b 100644
--- a/telepathy-gabble.spec
+++ b/telepathy-gabble.spec
@@ -6,7 +6,7 @@
 
 Name:           telepathy-gabble
 Version:        0.16.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A Jabber/XMPP connection manager
 
 Group:          Applications/Communications
@@ -14,6 +14,7 @@ Group:          Applications/Communications
 License:        LGPLv2+ and (BSD)
 URL:            http://telepathy.freedesktop.org/wiki/
 Source0:        http://telepathy.freedesktop.org/releases/%{name}/%{name}-%{version}.tar.gz
+Patch0:         0001-connection-Don-t-reset-the-capabilities-in-UpdateCap.patch
 
 BuildRequires:  dbus-devel >= 1.1.0
 BuildRequires:  dbus-glib-devel >= 0.82
@@ -44,6 +45,7 @@ chats and voice calls.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %if %{run_tests}
 %check
@@ -93,6 +95,9 @@ rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}/*.html
 
 
 %changelog
+* Fri Oct 19 2012 Debarshi Ray <rishi at fedoraproject.org> - 0.16.3-2
+- Fix FD #56181
+
 * Tue Sep 11 2012 Brian Pepple <bpepple at fedoraproject.org> - 0.16.3-1
 - Update to 0.16.3.
 


More information about the scm-commits mailing list