aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-call.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-tp-call.c')
-rw-r--r--libempathy/empathy-tp-call.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 9a9ed0bab..9957d8f25 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -481,16 +481,35 @@ static void
tp_call_async_cb (TpProxy *proxy,
const GError *error,
gpointer user_data,
- GObject *weak_object)
+ GObject *call)
{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
if (error)
{
empathy_debug (DEBUG_DOMAIN, "Error %s: %s",
user_data, error->message);
+ priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
+ g_signal_emit_by_name (call, "status-changed");
}
}
static void
+tp_call_invalidated_cb (TpProxy *stream_engine,
+ GQuark domain,
+ gint code,
+ gchar *message,
+ EmpathyTpCall *call)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+ empathy_debug (DEBUG_DOMAIN, "Stream engine proxy invalidated: %s",
+ message);
+ priv->status = EMPATHY_TP_CALL_STATUS_CLOSED;
+ g_signal_emit_by_name (call, "status-changed");
+}
+
+static void
tp_call_start_stream_engine (EmpathyTpCall *call)
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
@@ -506,6 +525,10 @@ tp_call_start_stream_engine (EmpathyTpCall *call)
tp_proxy_add_interface_by_id (priv->stream_engine,
EMP_IFACE_QUARK_CHANNEL_HANDLER);
+ g_signal_connect (priv->stream_engine, "invalidated",
+ G_CALLBACK (tp_call_invalidated_cb),
+ call);
+
emp_cli_channel_handler_call_handle_channel (priv->stream_engine, -1,
dbus_g_proxy_get_bus_name (DBUS_G_PROXY (priv->connection)),
dbus_g_proxy_get_path (DBUS_G_PROXY (priv->connection)),