telepathy-rakia: CallStream: Disable direction changes if mutable-contents= false
Olivier Crête
tester at kemper.freedesktop.org
Tue May 8 10:03:02 PDT 2012
Module: telepathy-rakia
Branch: master
Commit: 27fe5141c7a7ebf3873fc1ffde568481a42ae860
URL: http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=27fe5141c7a7ebf3873fc1ffde568481a42ae860
Author: Olivier Crête <olivier.crete at collabora.com>
Date: Fri Feb 24 21:29:38 2012 -0500
CallStream: Disable direction changes if mutable-contents=false
---
rakia/call-stream.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/rakia/call-stream.c b/rakia/call-stream.c
index c3c719f..4f13849 100644
--- a/rakia/call-stream.c
+++ b/rakia/call-stream.c
@@ -473,10 +473,25 @@ rakia_call_stream_set_sending (TpBaseMediaCallStream *stream,
RakiaCallStreamPrivate *priv = self->priv;
RakiaDirection current_direction =
rakia_sip_media_get_requested_direction (priv->media);
+ gboolean mutable_contents;
if (!!(current_direction & RAKIA_DIRECTION_SEND) == sending)
return TRUE;
+ /* Can't change the actual direction of a stream if we disable modifying
+ * the SDP, except if we're starting a call.
+ * In that case, we stop sending, but we don't inform the other side.
+ */
+ g_object_get (priv->channel,
+ "mutable-contents", &mutable_contents,
+ NULL);
+
+ if (!mutable_contents &&
+ !(tp_base_channel_is_requested (TP_BASE_CHANNEL (priv->channel)) &&
+ tp_base_call_channel_get_state (
+ TP_BASE_CALL_CHANNEL (priv->channel)) ==
+ TP_CALL_STATE_PENDING_INITIATOR))
+ return TRUE;
if (sending)
rakia_sip_media_set_requested_direction (priv->media,
More information about the telepathy-commits
mailing list