From f3e2e3efea55614e621bef49ee52993cd15a7678 Mon Sep 17 00:00:00 2001 From: Pekka Pessi Date: Tue, 22 Jan 2008 18:35:44 +0200 Subject: [PATCH] test_soa.c: testing hold with inactive, offered mode and setting remote activity flags while in hold darcs-hash:20080122163544-65a35-7321ff46337dbe56674b1cdd79151ac7e10b7440.gz --- libsofia-sip-ua/soa/test_soa.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/libsofia-sip-ua/soa/test_soa.c b/libsofia-sip-ua/soa/test_soa.c index 88ed4086..cbd808a4 100644 --- a/libsofia-sip-ua/soa/test_soa.c +++ b/libsofia-sip-ua/soa/test_soa.c @@ -473,6 +473,31 @@ int test_static_offer_answer(struct context *ctx) TEST(soa_is_audio_active(a), SOA_ACTIVE_INACTIVE); TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_INACTIVE); + /* B will send an offer to A, but there is no change in O/A status */ + TEST(soa_generate_offer(b, 1, test_completed), 0); + TEST(soa_get_local_sdp(b, NULL, &offer, &offerlen), 1); + TEST_1(offer != NULL && offer != NONE); + TEST_1(!strstr(offer, "a=inactive")); + printf("offer:\n%s", offer); + TEST(soa_set_remote_sdp(a, 0, offer, offerlen), 1); + TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_SENDRECV); + TEST(soa_generate_answer(a, test_completed), 0); + TEST(soa_is_audio_active(a), SOA_ACTIVE_INACTIVE); + TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_INACTIVE); + TEST_1(soa_is_complete(a)); + TEST(soa_activate(a, NULL), 0); + TEST(soa_get_local_sdp(a, NULL, &answer, &answerlen), 1); + TEST_1(answer != NULL && answer != NONE); + TEST_1(strstr(answer, "a=inactive")); + printf("answer:\n%s", answer); + TEST(soa_set_remote_sdp(b, 0, answer, -1), 1); + TEST(soa_process_answer(b, test_completed), 0); + TEST(soa_activate(b, NULL), 0); + + + TEST(soa_is_audio_active(b), SOA_ACTIVE_INACTIVE); + TEST(soa_is_remote_audio_active(b), SOA_ACTIVE_INACTIVE); + /* 'A' will release hold. */ TEST(soa_set_params(a, SOATAG_HOLD(NULL), TAG_END()), 1); -- 2.21.0