calls-dummy-origin: Fix ordering of state change and call removal callbacks

This commit is contained in:
Bob Ham
2019-07-22 11:52:44 +01:00
parent f12b411813
commit ebf579af78
2 changed files with 40 additions and 3 deletions

View File

@@ -43,14 +43,22 @@ test_dummy_call_get_state (CallFixture *fixture,
}
static gboolean
test_dummy_call_hang_up_idle_cb (CallsDummyOrigin *origin)
{
g_assert_null (calls_origin_get_calls (CALLS_ORIGIN (origin)));
return FALSE;
}
static void
test_dummy_call_hang_up (CallFixture *fixture,
gconstpointer user_data)
{
calls_call_hang_up (CALLS_CALL (fixture->dummy_call));
g_assert_null (calls_origin_get_calls
(CALLS_ORIGIN (fixture->parent.dummy_origin)));
// Mirror the dummy origin's use of an idle callback
g_idle_add ((GSourceFunc)test_dummy_call_hang_up_idle_cb,
fixture->parent.dummy_origin);
}
gint