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
|
||||
on_autoreject_state_changed_cb (CallsCall *call,
|
||||
CallsCallState new_state,
|
||||
CallsCallState old_state,
|
||||
on_autoreject_state_changed (CallsCall *call,
|
||||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_assert_cmpint (old_state, ==, CALLS_CALL_STATE_INCOMING);
|
||||
g_assert_cmpint (new_state, ==, CALLS_CALL_STATE_DISCONNECTED);
|
||||
CallsCallState state = calls_call_get_state (call);
|
||||
|
||||
g_assert_cmpint (state, ==, CALLS_CALL_STATE_DISCONNECTED);
|
||||
|
||||
g_object_unref (call);
|
||||
|
||||
|
@ -233,8 +233,9 @@ on_incoming_call_autoreject_cb (CallsOrigin *origin,
|
|||
g_object_ref (call);
|
||||
g_idle_add ((GSourceFunc) on_call_hangup_cb, call);
|
||||
|
||||
g_signal_connect (call, "state-changed",
|
||||
(GCallback) on_autoreject_state_changed_cb, NULL);
|
||||
g_signal_connect (call, "notify::state",
|
||||
G_CALLBACK (on_autoreject_state_changed),
|
||||
NULL);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue