summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ua.c2
-rw-r--r--test/call.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ua.c b/src/ua.c
index 009553a..65834a6 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -799,6 +799,8 @@ void ua_hangup(struct ua *ua, struct call *call,
(void)call_hangup(call, scode, reason);
+ ua_event(ua, UA_EVENT_CALL_CLOSED, call, reason);
+
mem_deref(call);
resume_call(ua);
diff --git a/test/call.c b/test/call.c
index 64854fd..b597f3a 100644
--- a/test/call.c
+++ b/test/call.c
@@ -311,7 +311,7 @@ int test_call_answer_hangup_a(void)
TEST_ERR(fix.err);
ASSERT_EQ(1, fix.a.n_established);
- ASSERT_EQ(0, fix.a.n_closed);
+ ASSERT_EQ(1, fix.a.n_closed);
ASSERT_EQ(0, fix.a.close_scode);
ASSERT_EQ(1, fix.b.n_established);
@@ -349,7 +349,7 @@ int test_call_answer_hangup_b(void)
ASSERT_EQ(0, fix.a.close_scode);
ASSERT_EQ(1, fix.b.n_established);
- ASSERT_EQ(0, fix.b.n_closed);
+ ASSERT_EQ(1, fix.b.n_closed);
ASSERT_EQ(0, fix.b.close_scode);
out: