mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-15 12:55:36 +00:00
tests: sip: Switch to state notify signal
This commit is contained in:
parent
7c5dcd37d7
commit
0dc761d87c
1 changed files with 9 additions and 8 deletions
|
@ -156,13 +156,13 @@ on_call_answer_cb (gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_autoreject_state_changed_cb (CallsCall *call,
|
on_autoreject_state_changed (CallsCall *call,
|
||||||
CallsCallState new_state,
|
GParamSpec *pspec,
|
||||||
CallsCallState old_state,
|
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_assert_cmpint (old_state, ==, CALLS_CALL_STATE_INCOMING);
|
CallsCallState state = calls_call_get_state (call);
|
||||||
g_assert_cmpint (new_state, ==, CALLS_CALL_STATE_DISCONNECTED);
|
|
||||||
|
g_assert_cmpint (state, ==, CALLS_CALL_STATE_DISCONNECTED);
|
||||||
|
|
||||||
g_object_unref (call);
|
g_object_unref (call);
|
||||||
|
|
||||||
|
@ -233,8 +233,9 @@ on_incoming_call_autoreject_cb (CallsOrigin *origin,
|
||||||
g_object_ref (call);
|
g_object_ref (call);
|
||||||
g_idle_add ((GSourceFunc) on_call_hangup_cb, call);
|
g_idle_add ((GSourceFunc) on_call_hangup_cb, call);
|
||||||
|
|
||||||
g_signal_connect (call, "state-changed",
|
g_signal_connect (call, "notify::state",
|
||||||
(GCallback) on_autoreject_state_changed_cb, NULL);
|
G_CALLBACK (on_autoreject_state_changed),
|
||||||
|
NULL);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue