summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-18 14:39:55 +0200
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-18 14:31:14 +0100
commit78c1ba86bea611f7471ad84c5d0d3d1c983d1628 (patch)
treee883f0dd4aa301478d4914cb97d2cfc6a231f9f1
parent3e9c56e9a4fa27c4abb63b85bf5012bb1dab50c8 (diff)
downloadtelepathy-haze-0.4.tar.gz
instantiate the media manager only if the protocol support calls (fdo #30594)telepathy-haze-0.4
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 cb1460b..b369bcb 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -483,9 +483,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 (