Commit f3e2e3ef authored by Pekka Pessi's avatar Pekka Pessi
Browse files

test_soa.c: testing hold with inactive, offered mode and setting remote...

test_soa.c: testing hold with inactive, offered mode and setting remote activity flags while in hold

parent 1ac40aa9
......@@ -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(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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment