aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-03-17 19:35:46 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 17:20:07 +0800
commit2ca45f96fa9f54295cd0416842192cf6e7be671d (patch)
tree3b33d857551d73ba228488511bd47d35cbde7698
parentcf83cc9c5a936c88e7e22033956001c4638b7d14 (diff)
downloadgsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar.gz
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar.bz2
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar.lz
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar.xz
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.tar.zst
gsoc2013-empathy-2ca45f96fa9f54295cd0416842192cf6e7be671d.zip
Cope with unexpected call channel invalidation
-rw-r--r--src/empathy-call-handler.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/empathy-call-handler.c b/src/empathy-call-handler.c
index 02a5af691..a7aafad64 100644
--- a/src/empathy-call-handler.c
+++ b/src/empathy-call-handler.c
@@ -168,6 +168,24 @@ on_get_contacts_cb (TpConnection *connection,
}
static void
+on_call_invalidated_cb (TpyCallChannel *call,
+ guint domain,
+ gint code,
+ gchar *message,
+ EmpathyCallHandler *self)
+{
+ EmpathyCallHandlerPriv *priv = self->priv;
+
+ if (priv->call == call)
+ {
+ /* Invalidated unexpectedly? Fake call ending */
+ g_signal_emit (self, signals[STATE_CHANGED], 0, TPY_CALL_STATE_ENDED);
+ tp_clear_object (&priv->call);
+ tp_clear_object (&priv->tfchannel);
+ }
+}
+
+static void
on_call_state_changed_cb (TpyCallChannel *call,
TpyCallState state,
TpyCallFlags flags,
@@ -254,6 +272,8 @@ empathy_call_handler_set_property (GObject *object,
tp_g_signal_connect_object (priv->call, "state-changed",
G_CALLBACK (on_call_state_changed_cb), object, 0);
+ tp_g_signal_connect_object (priv->call, "invalidated",
+ G_CALLBACK (on_call_invalidated_cb), object, 0);
break;
case PROP_INITIAL_AUDIO:
priv->initial_audio = g_value_get_boolean (value);