Commit 178bcd63 authored by Julien Wadel's avatar Julien Wadel
Browse files

Tester : Keep a ref on call for statistics

parent db0cb673
......@@ -1439,6 +1439,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
stats initial_pauline_stats = pauline->stat;
if (call) {
call = linphone_call_ref(call);
params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly);
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendOnly);
......@@ -1464,7 +1465,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
}
linphone_call_unref(call);
}
......@@ -1475,6 +1476,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneCallReleased,initial_pauline_stats.number_of_LinphoneCallReleased, int, "%d");
if (call) {
call = linphone_call_ref(call);
check_media_direction(pauline,call,lcs,LinphoneMediaDirectionRecvOnly,LinphoneMediaDirectionRecvOnly);
float quality = linphone_call_get_current_quality(call);
......@@ -1482,6 +1484,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
wait_for_until(marie->lc, pauline->lc, &dummy, 1, 3000);
quality = linphone_call_get_current_quality(call);
BC_ASSERT_GREATER(quality, 1.0, float, "%f");
linphone_call_unref(call);
}
ms_free(remote_uri);
......
......@@ -149,7 +149,7 @@ static void video_call_with_thin_congestion(void){
linphone_core_set_network_simulator_params(marie->lc, &simparams);
if (BC_ASSERT_TRUE(call(marie, pauline))){
LinphoneCall *call = linphone_core_get_current_call(pauline->lc);
/* Wait ten seconds. The bandwidth estimator will confirm the 430 kbit/s available. */
wait_for_until(marie->lc, pauline->lc, NULL, 0, 10000);
/* Now suddenly limit to 300 kbit/s */
......@@ -161,7 +161,9 @@ static void video_call_with_thin_congestion(void){
/*another tmmbr with a greater value is expected once the congestion is resolved*/
BC_ASSERT_TRUE(wait_for_until(marie->lc, pauline->lc, &marie->stat.last_tmmbr_value_received, 250000, 50000));
BC_ASSERT_GREATER(linphone_call_get_current_quality(call), 4.f, float, "%f");
LinphoneCall *call = linphone_core_get_current_call(pauline->lc);
if(BC_ASSERT_PTR_NOT_NULL(call))
BC_ASSERT_GREATER(linphone_call_get_current_quality(call), 4.f, float, "%f");
end_call(marie, pauline);
}
......
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