Commit f3e2e3ef authored by Pekka Pessi's avatar Pekka Pessi

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

darcs-hash:20080122163544-65a35-7321ff46337dbe56674b1cdd79151ac7e10b7440.gz
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_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);
......
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