summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDebarshi Ray <rishi@gnu.org>2012-10-19 16:17:35 +0200
committerDebarshi Ray <rishi@gnu.org>2012-10-21 12:17:27 +0200
commit3a068ebe96a0586247f4f597877a0dab78b47779 (patch)
treee78da66960780bc19ab28e4356c1ad35416f7784 /src
parent2a1788842f38aaadb028ddd96f7e82f6db7e70b8 (diff)
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. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56181 Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/caps-channel-manager.c15
-rw-r--r--src/connection.c15
-rw-r--r--src/media-factory.c9
3 files changed, 2 insertions, 37 deletions
diff --git a/src/caps-channel-manager.c b/src/caps-channel-manager.c
index dea13a652..135427aa0 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 5ea0d1a67..e53b3de1d 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 493a8173c..8f3e39761 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;
}