]> git.0d.be Git - empathy.git/commitdiff
When the remote side hangs up, clean up the call channel
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Thu, 17 Mar 2011 11:41:25 +0000 (11:41 +0000)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 9 Jun 2011 09:20:07 +0000 (10:20 +0100)
src/empathy-call-handler.c

index a7aafad642788b0788b657d5613db97688f707b2..aff96bd6e9bb8a6988e13cc6f05195b84be385fd 100644 (file)
@@ -193,10 +193,17 @@ on_call_state_changed_cb (TpyCallChannel *call,
   GHashTable *call_state_details,
   EmpathyCallHandler *handler)
 {
-  if (state == TPY_CALL_STATE_ENDED)
-    tp_channel_close_async (TP_CHANNEL (call), NULL, NULL);
+  EmpathyCallHandlerPriv *priv = handler->priv;
 
   g_signal_emit (handler, signals[STATE_CHANGED], 0, state);
+
+  if (state == TPY_CALL_STATE_ENDED)
+    {
+      tp_channel_close_async (TP_CHANNEL (call), NULL, NULL);
+
+      tp_clear_object (&priv->call);
+      tp_clear_object (&priv->tfchannel);
+    }
 }
 
 static void