summaryrefslogtreecommitdiff
path: root/telepathy-glib/base-call-channel.c
diff options
context:
space:
mode:
authorDebarshi Ray <rishi@gnu.org>2012-10-17 14:48:11 +0200
committerDebarshi Ray <rishi@gnu.org>2012-10-17 16:53:12 +0200
commit48a6895f21fd3a3ef996e3e18ded4ed8a8f9f576 (patch)
tree844b9d058a26bb6931763cf8fdc97ce0f23a85c0 /telepathy-glib/base-call-channel.c
parentdfca38a93e2c504c1a4643eec291c4ddb4368f4f (diff)
downloadtelepathy-glib-48a6895f21fd3a3ef996e3e18ded4ed8a8f9f576.tar.gz
base-call-channel: Don't call set_state from set_ringing and set_queued
... because they only change the flags and not the state. Instead emit CallStateChanged directly. Fixes: https://bugs.freedesktop.org/56044
Diffstat (limited to 'telepathy-glib/base-call-channel.c')
-rw-r--r--telepathy-glib/base-call-channel.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/telepathy-glib/base-call-channel.c b/telepathy-glib/base-call-channel.c
index 6b994a630..045a2b3df 100644
--- a/telepathy-glib/base-call-channel.c
+++ b/telepathy-glib/base-call-channel.c
@@ -754,6 +754,25 @@ call_state_to_string (TpCallState state)
return state_str;
}
+static void
+tp_base_call_channel_flags_changed (TpBaseCallChannel *self,
+ guint actor_handle,
+ TpCallStateChangeReason reason,
+ const gchar *dbus_reason,
+ const gchar *message)
+{
+ g_value_array_free (self->priv->reason);
+ self->priv->reason = _tp_base_call_state_reason_new (actor_handle, reason,
+ dbus_reason, message);
+
+ if (tp_base_channel_is_registered (TP_BASE_CHANNEL (self)))
+ {
+ tp_svc_channel_type_call_emit_call_state_changed (self,
+ self->priv->state, self->priv->flags, self->priv->reason,
+ self->priv->details);
+ }
+}
+
/**
* tp_base_call_channel_set_state:
* @self: a #TpBaseCallChannel
@@ -1290,7 +1309,7 @@ tp_base_call_channel_set_ringing (TpSvcChannelTypeCall *iface,
self->priv->flags |= TP_CALL_FLAG_LOCALLY_RINGING;
self->priv->flags &= ~TP_CALL_FLAG_LOCALLY_QUEUED;
- tp_base_call_channel_set_state (self, self->priv->state,
+ tp_base_call_channel_flags_changed (self,
tp_base_channel_get_self_handle ((TpBaseChannel *) self),
TP_CALL_STATE_CHANGE_REASON_PROGRESS_MADE, "",
"Local client has started ringing");
@@ -1331,7 +1350,7 @@ tp_base_call_channel_set_queued (TpSvcChannelTypeCall *iface,
klass->set_queued (self);
self->priv->flags |= TP_CALL_FLAG_LOCALLY_QUEUED;
- tp_base_call_channel_set_state (self, self->priv->state,
+ tp_base_call_channel_flags_changed (self,
tp_base_channel_get_self_handle ((TpBaseChannel *) self),
TP_CALL_STATE_CHANGE_REASON_PROGRESS_MADE, "",
"Local client has queued the call");