diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2011-12-26 20:56:50 -0500 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-01-10 09:52:46 +0100 |
commit | aae1ccf8c6fde76f7728aa921d0bacb138ad5440 (patch) | |
tree | fa6ee3c2df93532a60e167f2b2e79919541716e3 /telepathy-glib/base-call-stream.c | |
parent | 8aa61104494698debae8df3c11bc9df672c6dbc9 (diff) | |
download | telepathy-glib-aae1ccf8c6fde76f7728aa921d0bacb138ad5440.tar.gz |
Set the sending and receiving directions correctly
Diffstat (limited to 'telepathy-glib/base-call-stream.c')
-rw-r--r-- | telepathy-glib/base-call-stream.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/telepathy-glib/base-call-stream.c b/telepathy-glib/base-call-stream.c index 30cff81b7..49cb6321f 100644 --- a/telepathy-glib/base-call-stream.c +++ b/telepathy-glib/base-call-stream.c @@ -500,6 +500,12 @@ tp_base_call_stream_update_local_sending_state (TpBaseCallStream *self, g_return_val_if_fail (TP_IS_BASE_CALL_STREAM (self), FALSE); + if (new_state == TP_SENDING_STATE_SENDING && + self->priv->channel != NULL && + !tp_base_call_channel_is_accepted (self->priv->channel) && + !tp_base_channel_is_requested (TP_BASE_CHANNEL (self->priv->channel))) + new_state = TP_SENDING_STATE_PENDING_SEND; + if (self->priv->local_sending_state == new_state) return FALSE; @@ -584,6 +590,12 @@ tp_base_call_stream_update_remote_sending_state (TpBaseCallStream *self, g_return_val_if_fail (TP_IS_BASE_CALL_STREAM (self), FALSE); + if (new_state == TP_SENDING_STATE_SENDING && + self->priv->channel != NULL && + tp_base_channel_is_requested (TP_BASE_CHANNEL (self->priv->channel)) && + !tp_base_call_channel_is_accepted (self->priv->channel)) + new_state = TP_SENDING_STATE_PENDING_SEND; + exists = g_hash_table_lookup_extended (self->priv->remote_members, GUINT_TO_POINTER (contact), NULL, &state_p); @@ -684,7 +696,7 @@ tp_base_call_stream_set_sending_dbus (TpSvcCallStream *iface, if (_tp_base_call_stream_set_sending (TP_BASE_CALL_STREAM (iface), sending, tp_base_channel_get_self_handle ((TpBaseChannel *) self->priv->channel), TP_CALL_STATE_CHANGE_REASON_USER_REQUESTED, "", - "User changed the sendingt state", &error)) + "User changed the sending state", &error)) { tp_svc_call_stream_return_from_set_sending (context); } |