fix test that sometimes crashes when call is not established

This commit is contained in:
Simon Morlat 2016-01-18 11:20:19 +01:00
parent e8f41de8b7
commit fcadf804eb

View file

@ -4568,6 +4568,7 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
LinphoneCallParams *params;
const LinphoneCallParams *current_params;
MSList *lcs=NULL;
bool_t calls_ok;
marie = linphone_core_manager_new( "marie_rc");
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
@ -4580,7 +4581,10 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
video_call_base_2(marie,pauline,TRUE,mode,TRUE,TRUE);
if (linphone_core_get_current_call(marie->lc)) {
calls_ok = linphone_core_get_current_call(marie->lc) != NULL && linphone_core_get_current_call(pauline->lc) != NULL;
BC_ASSERT_TRUE(calls_ok);
if (calls_ok) {
params=linphone_core_create_call_params(marie->lc,linphone_core_get_current_call(marie->lc));
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionInactive);
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionInactive);