aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2012-03-13 22:55:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-15 23:16:47 +0800
commit1146d93912bb4374bf2b391e71584bcef1da3df6 (patch)
tree034f0c646100de4080745abf8abe5fff0ab58722 /src/empathy-call-window.c
parentf17b4a2962cdc74a3fc2e410b5885ae96e3ed4e4 (diff)
downloadgsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar.gz
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar.bz2
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar.lz
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar.xz
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.tar.zst
gsoc2013-empathy-1146d93912bb4374bf2b391e71584bcef1da3df6.zip
Disconnect when a call is ENDED
If for some unspecified reason a call go to the TP_CALL_STATE_ENDED state, reinitialize the call window. https://bugzilla.gnome.org/show_bug.cgi?id=671931
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 565c65d00..9b057c0ef 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -3182,10 +3182,12 @@ empathy_call_window_state_changed_cb (EmpathyCallHandler *handler,
TpCallChannel *call;
gboolean can_send_video;
- if (state == TP_CALL_STATE_ENDED &&
- !tp_strdiff (reason, TP_ERROR_STR_INSUFFICIENT_BALANCE))
+ if (state == TP_CALL_STATE_ENDED)
{
- show_balance_error (self);
+ DEBUG ("Call ended: %s", (reason != NULL && reason[0] != '\0') ? reason : "unspecified reason");
+ empathy_call_window_disconnected (self, TRUE);
+ if (!tp_strdiff (reason, TP_ERROR_STR_INSUFFICIENT_BALANCE))
+ show_balance_error (self);
return;
}
@@ -3982,9 +3984,10 @@ static void
empathy_call_window_hangup_cb (gpointer object,
EmpathyCallWindow *self)
{
+ /* stopping the call will put it the ENDED state and
+ * from state_changed_cb we'll reconfigure the window
+ */
empathy_call_handler_stop_call (self->priv->handler);
-
- empathy_call_window_disconnected (self, TRUE);
}
static void