[empathy] Disconnect when a call is ENDED



commit 1146d93912bb4374bf2b391e71584bcef1da3df6
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Tue Mar 13 15:55:08 2012 +0100

    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

 src/empathy-call-window.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 565c65d..9b057c0 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]