diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-02-26 21:31:23 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-02-26 21:31:23 +0800 |
commit | 2faf4680ed7393ebf3eb587a374e5543cf627c5a (patch) | |
tree | de55388a886c5134c0ce584e22fcb0d182e857a8 | |
parent | 404e0cd0f04718b49f001e3a0b3a028f8cab1253 (diff) | |
download | gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar.gz gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar.bz2 gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar.lz gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar.xz gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.tar.zst gsoc2013-empathy-2faf4680ed7393ebf3eb587a374e5543cf627c5a.zip |
Change status to closed if stream engine dies or if a call fails.
svn path=/trunk/; revision=668
-rw-r--r-- | libempathy/empathy-tp-call.c | 25 |
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)), |