mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
tester: fix quality reporting with custom route test when using tunnel
This commit is contained in:
parent
4ade5326e1
commit
fd7f6a4c73
3 changed files with 9 additions and 23 deletions
|
|
@ -339,26 +339,9 @@ static void quality_reporting_session_report_if_video_stopped() {
|
|||
}
|
||||
|
||||
void publish_report_with_route_state_changed(LinphoneCore *lc, LinphoneEvent *ev, LinphonePublishState state){
|
||||
stats* counters = get_stats(lc);
|
||||
const LinphoneAddress* from_addr = linphone_event_get_from(ev);
|
||||
char* from = linphone_address_as_string(from_addr);
|
||||
ms_message("Publish state [%s] from [%s]",linphone_publish_state_to_string(state),from);
|
||||
ms_free(from);
|
||||
switch(state){
|
||||
case LinphonePublishProgress:
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_as_string(linphone_event_get_resource(ev)), linphone_proxy_config_get_quality_reporting_collector(linphone_core_get_default_proxy_config(lc)));
|
||||
counters->number_of_LinphonePublishProgress++;
|
||||
break;
|
||||
case LinphonePublishOk:
|
||||
counters->number_of_LinphonePublishOk++;
|
||||
break;
|
||||
case LinphonePublishError: counters->number_of_LinphonePublishError++; break;
|
||||
case LinphonePublishExpiring: counters->number_of_LinphonePublishExpiring++; break;
|
||||
case LinphonePublishCleared: counters->number_of_LinphonePublishCleared++;break;
|
||||
default:
|
||||
break;
|
||||
if (state == LinphonePublishProgress) {
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_as_string(linphone_event_get_resource(ev)), linphone_proxy_config_get_quality_reporting_collector(linphone_core_get_default_proxy_config(lc)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void quality_reporting_sent_using_custom_route() {
|
||||
|
|
@ -367,7 +350,10 @@ static void quality_reporting_sent_using_custom_route() {
|
|||
LinphoneCall* call_marie = NULL;
|
||||
LinphoneCall* call_pauline = NULL;
|
||||
|
||||
marie->lc->current_vtable->publish_state_changed = publish_report_with_route_state_changed;
|
||||
LinphoneCoreVTable publish_vtable = {0};
|
||||
publish_vtable.publish_state_changed = publish_report_with_route_state_changed;
|
||||
linphone_core_add_listener(marie->lc, &publish_vtable);
|
||||
|
||||
//INVALID collector: sip.linphone.org do not collect reports, so it will throw a 404 Not Found error
|
||||
linphone_proxy_config_set_quality_reporting_collector(linphone_core_get_default_proxy_config(marie->lc), "sip:sip.linphone.org");
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char* path, c
|
|||
|
||||
if (file){
|
||||
filepath = ms_strdup_printf("%s/%s", path, file);
|
||||
BC_ASSERT_EQUAL_FATAL(ortp_file_exist(filepath),0,int,"%d");
|
||||
BC_ASSERT_EQUAL_FATAL(ortp_file_exist(filepath),0,int, "%d");
|
||||
config = lp_config_new_with_factory(NULL,filepath);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ static void call_with_tunnel_base(LinphoneTunnelMode tunnel_mode, bool_t with_si
|
|||
pauline_call=linphone_core_get_current_call(pauline->lc);
|
||||
BC_ASSERT_PTR_NOT_NULL(pauline_call);
|
||||
if (pauline_call!=NULL){
|
||||
BC_ASSERT_PTR_EQUAL(linphone_call_params_get_media_encryption(linphone_call_get_current_params(pauline_call)),
|
||||
encryption);
|
||||
BC_ASSERT_EQUAL(linphone_call_params_get_media_encryption(linphone_call_get_current_params(pauline_call)),
|
||||
encryption, int, "%d");
|
||||
}
|
||||
if (tunnel_mode == LinphoneTunnelModeEnable && with_sip){
|
||||
/* make sure the call from pauline arrived from the tunnel by checking the contact address*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue