summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-18 12:39:55 (GMT)
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-18 13:29:53 (GMT)
commit924fa3d90eb1a4949e431b0bd6284071f0d5b38b (patch)
treecf3ff3a428d9043ea8c2607e5f58c2c51b69acca
parent9eeac8fdb16838f7079a01351171ff0b268ff57a (diff)
downloadtelepathy-haze-master.tar.gz
telepathy-haze-master.tar.xz
instantiate the media manager only if the protocol support calls (fdo #30594)HEADmaster
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=30594> Signed-off-by: Will Thompson <will.thompson@collabora.co.uk>
-rw-r--r--src/connection.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c
index 631d5a9..8ffd281 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -446,9 +446,13 @@ _haze_connection_create_channel_managers (TpBaseConnection *base)
g_ptr_array_add (channel_managers, self->im_factory);
#ifdef ENABLE_MEDIA
- self->media_manager = HAZE_MEDIA_MANAGER (
- g_object_new (HAZE_TYPE_MEDIA_MANAGER, "connection", self, NULL));
- g_ptr_array_add (channel_managers, self->media_manager);
+ /* Instantiate the media manager only if the protocol support calls */
+ if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC (self->priv->prpl_info, initiate_media))
+ {
+ self->media_manager = HAZE_MEDIA_MANAGER (
+ g_object_new (HAZE_TYPE_MEDIA_MANAGER, "connection", self, NULL));
+ g_ptr_array_add (channel_managers, self->media_manager);
+ }
#endif
self->contact_list = HAZE_CONTACT_LIST (