]> git.0d.be Git - empathy.git/blobdiff - src/empathy-call-handler.c
call-handler: check the state before deferring the accept()
[empathy.git] / src / empathy-call-handler.c
index 614b470c661e2ff49251d7f6d2dda3c75fe11622..703ed3299b74f0a25981dca1a1689c7fb1e2aae5 100644 (file)
@@ -910,7 +910,13 @@ empathy_call_handler_start_call (EmpathyCallHandler *handler,
   if (priv->call != NULL)
     {
       empathy_call_handler_start_tpfs (handler);
-      priv->accept_when_initialised = TRUE;
+
+      if (tp_call_channel_get_state (priv->call, NULL, NULL, NULL) ==
+          TP_CALL_STATE_INITIALISED)
+        tp_call_channel_accept_async (priv->call, on_call_accepted_cb, NULL);
+      else
+        priv->accept_when_initialised = TRUE;
+
       return;
     }