1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-09-27 06:05:30 +00:00

tests: sip: Switch to state notify signal

This commit is contained in:
Evangelos Ribeiro Tzaras 2022-01-14 07:27:29 +01:00
parent 7c5dcd37d7
commit 0dc761d87c

View file

@ -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,
gpointer user_data)
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;
}