Commit e6500c17 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix crash

parent 902fc4f9
mediastreamer2 @ 2be165a1
Subproject commit 82f9cf317da9199454f722f37a493c3a228876cc Subproject commit 2be165a129a174a6b9a51574aee85f90d4f38084
oRTP @ 3b0892f8
Subproject commit 3c10c678342f7c2ca2d49537b86aa81b098e6110 Subproject commit 3b0892f87fecbd7d3e2b34b381527ab1d7e59a59
...@@ -1216,33 +1216,35 @@ static void call_paused_resumed_with_loss(void) { ...@@ -1216,33 +1216,35 @@ static void call_paused_resumed_with_loss(void) {
CU_ASSERT_TRUE(call(pauline,marie)); CU_ASSERT_TRUE(call(pauline,marie));
call_pauline = linphone_core_get_current_call(pauline->lc); call_pauline = linphone_core_get_current_call(pauline->lc);
rtp_session_enable_network_simulation(call_pauline->audiostream->ms.sessions.rtp_session,&params); if (call_pauline){
rtp_session_enable_network_simulation(call_pauline->audiostream->ms.sessions.rtp_session,&params);
/*generate some traffic*/
wait_for_until(pauline->lc, marie->lc, NULL, 5, 6000); /*generate some traffic*/
CHECK_CURRENT_LOSS_RATE(); wait_for_until(pauline->lc, marie->lc, NULL, 5, 6000);
CHECK_CURRENT_LOSS_RATE();
/*pause call*/
linphone_core_pause_call(pauline->lc,call_pauline); /*pause call*/
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallPausing,1)); linphone_core_pause_call(pauline->lc,call_pauline);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallPausedByRemote,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallPausing,1));
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallPaused,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallPausedByRemote,1));
/*stay in pause a little while in order to generate traffic*/ CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallPaused,1));
wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000); /*stay in pause a little while in order to generate traffic*/
CHECK_CURRENT_LOSS_RATE(); wait_for_until(pauline->lc, marie->lc, NULL, 5, 5000);
CHECK_CURRENT_LOSS_RATE();
/*resume*/
linphone_core_resume_call(pauline->lc,call_pauline); /*resume*/
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2)); linphone_core_resume_call(pauline->lc,call_pauline);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2));
wait_for_until(pauline->lc, marie->lc, NULL, 5, 6000); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2));
wait_for_until(pauline->lc, marie->lc, NULL, 5, 6000);
/*since stats are NOT totally reset during pause, the stats->packet_recv is computed from /*since stats are NOT totally reset during pause, the stats->packet_recv is computed from
the start of call. This test ensures that the loss rate is consistent during the entire call.*/ the start of call. This test ensures that the loss rate is consistent during the entire call.*/
CHECK_CURRENT_LOSS_RATE(); CHECK_CURRENT_LOSS_RATE();
linphone_core_terminate_all_calls(marie->lc); linphone_core_terminate_all_calls(marie->lc);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1));
}
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline); linphone_core_manager_destroy(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