From 9b6ebbc00cb7e036863bd7f617e0302de9fce3b4 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 15 Mar 2016 17:18:18 +0100 Subject: [PATCH] refine test about supported tags --- coreapi/offeranswer.c | 2 +- tester/call_tester.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/coreapi/offeranswer.c b/coreapi/offeranswer.c index bedfa51ab..8fab8ab1b 100644 --- a/coreapi/offeranswer.c +++ b/coreapi/offeranswer.c @@ -438,7 +438,7 @@ static void initiate_outgoing(MSFactory* factory, const SalStreamDescription *lo result->dtls_role = SalDtlsRoleInvalid; } result->rtcp_mux = remote_answer->rtcp_mux && local_offer->rtcp_mux; - result->implicit_rtcp_fb = local_offer->implicit_rtcp_fb && remote_answer->implicit_rtcp_fb; + result->implicit_rtcp_fb = local_offer->implicit_rtcp_fb && remote_answer->implicit_rtcp_fb; } diff --git a/tester/call_tester.c b/tester/call_tester.c index 4ad8f5472..853f49bd5 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -4203,26 +4203,34 @@ static void call_with_in_dialog_codec_change(void) { static void call_with_in_dialog_codec_change_no_sdp(void) { call_with_in_dialog_codec_change_base(TRUE); } + static void call_with_custom_supported_tags(void) { LinphoneCoreManager* marie; LinphoneCoreManager* pauline; const LinphoneCallParams *remote_params; const char *recv_supported; - bool_t call_ok; + LinphoneCall *pauline_call; marie = linphone_core_manager_new( "marie_rc"); pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); linphone_core_add_supported_tag(marie->lc,"pouet-tag"); - BC_ASSERT_TRUE(call_ok=call(pauline,marie)); - if (!call_ok) goto end; - liblinphone_tester_check_rtcp(marie,pauline); - remote_params=linphone_call_get_remote_params(linphone_core_get_current_call(pauline->lc)); + linphone_core_add_supported_tag(marie->lc,"truc-tag"); + linphone_core_add_supported_tag(marie->lc,"machin-tag"); + + linphone_core_invite_address(marie->lc, pauline->identity); + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallIncomingReceived,1)); + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallOutgoingRinging,1)); + pauline_call = linphone_core_get_current_call(pauline->lc); + if (!pauline_call) goto end; + + remote_params=linphone_call_get_remote_params(pauline_call); recv_supported=linphone_call_params_get_custom_header(remote_params,"supported"); BC_ASSERT_PTR_NOT_NULL(recv_supported); if (recv_supported){ - BC_ASSERT_PTR_NOT_NULL(strstr(recv_supported,"pouet-tag")); + BC_ASSERT_PTR_NOT_NULL(strstr(recv_supported,"pouet-tag, truc-tag, machin-tag")); } + end_call(marie,pauline); end: linphone_core_manager_destroy(marie);