mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 15:18:11 +00:00
Add check to prevent crash.
This commit is contained in:
parent
2391436cd2
commit
169cbaac09
1 changed files with 8 additions and 6 deletions
|
|
@ -419,13 +419,15 @@ static bool_t check_ice(LinphoneCoreManager* caller, LinphoneCoreManager* callee
|
|||
CU_ASSERT_PTR_NOT_NULL(c2);
|
||||
|
||||
for (i=0;i<200;i++){
|
||||
if (linphone_call_get_audio_stats(c1)->ice_state==LinphoneIceStateHostConnection &&
|
||||
linphone_call_get_audio_stats(c2)->ice_state==LinphoneIceStateHostConnection ){
|
||||
success=TRUE;
|
||||
break;
|
||||
if ((c1 != NULL) && (c2 != NULL)) {
|
||||
if (linphone_call_get_audio_stats(c1)->ice_state==LinphoneIceStateHostConnection &&
|
||||
linphone_call_get_audio_stats(c2)->ice_state==LinphoneIceStateHostConnection ){
|
||||
success=TRUE;
|
||||
break;
|
||||
}
|
||||
linphone_core_iterate(caller->lc);
|
||||
linphone_core_iterate(callee->lc);
|
||||
}
|
||||
linphone_core_iterate(caller->lc);
|
||||
linphone_core_iterate(callee->lc);
|
||||
ms_usleep(50000);
|
||||
}
|
||||
return success;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue