summaryrefslogtreecommitdiff
path: root/src/call-stream.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-27 03:06:59 -0500
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-01-11 09:53:39 +0100
commit20483522b56a08c5fe01b1012db89c8e7239b850 (patch)
treedd78455bc41fa255b9b0684cbcca052aab8f17f2 /src/call-stream.c
parent8fe2c028aedd1b9daae79546cbb07cb9e1b50759 (diff)
downloadtelepathy-gabble-20483522b56a08c5fe01b1012db89c8e7239b850.tar.gz
Add test for pending states when the other side asks to send
Diffstat (limited to 'src/call-stream.c')
-rw-r--r--src/call-stream.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/call-stream.c b/src/call-stream.c
index 93ef807a9..78ff09c24 100644
--- a/src/call-stream.c
+++ b/src/call-stream.c
@@ -82,6 +82,8 @@ struct _GabbleCallStreamPrivate
{
gboolean dispose_has_run;
+ gboolean want_send;
+
GabbleJingleContent *content;
};
@@ -92,6 +94,8 @@ gabble_call_stream_init (GabbleCallStream *self)
GABBLE_TYPE_CALL_STREAM, GabbleCallStreamPrivate);
self->priv = priv;
+
+ self->priv->want_send = TRUE;
}
static void gabble_call_stream_dispose (GObject *object);
@@ -387,11 +391,17 @@ gabble_call_stream_update_member_states (GabbleCallStream *self)
if (gabble_jingle_content_sending (priv->content))
{
- local_state = TP_SENDING_STATE_SENDING;
+ if (self->priv->want_send)
+ local_state = TP_SENDING_STATE_SENDING;
+ else
+ local_state = TP_SENDING_STATE_PENDING_SEND;
}
else
{
- local_state = TP_SENDING_STATE_NONE;
+ if (!self->priv->want_send)
+ local_state = TP_SENDING_STATE_NONE;
+ else
+ local_state = TP_SENDING_STATE_PENDING_STOP_SENDING;
}
if (gabble_jingle_content_receiving (priv->content))
@@ -576,6 +586,8 @@ gabble_call_stream_set_sending (TpBaseCallStream *stream,
TpStreamFlowState flowstate = tp_base_media_call_stream_get_sending_state (
bmcs);
+ self->priv->want_send = sending;
+
gabble_jingle_content_set_sending (self->priv->content, sending);
if (sending && flowstate != TP_STREAM_FLOW_STATE_STARTED)