[calls] tests: sip: Switch to state notify signal
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] tests: sip: Switch to state notify signal
- Date: Thu, 20 Jan 2022 10:50:29 +0000 (UTC)
commit 0dc761d87c4883e1d0e99b8afdcb881f8bd0c4d3
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Fri Jan 14 07:27:29 2022 +0100
tests: sip: Switch to state notify signal
tests/test-sip.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/tests/test-sip.c b/tests/test-sip.c
index d6d8bd5c..edfe9115 100644
--- a/tests/test-sip.c
+++ b/tests/test-sip.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]