mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 22:28:07 +00:00
Null-check the auth-info when it fails. In some cases it could be Nil
This commit is contained in:
parent
cb355233b2
commit
d28e18e058
1 changed files with 12 additions and 7 deletions
|
|
@ -827,15 +827,20 @@ static void call_released(SalOp *op){
|
|||
|
||||
static void auth_failure(SalOp *op, SalAuthInfo* info) {
|
||||
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
|
||||
LinphoneAuthInfo *ai=(LinphoneAuthInfo*)linphone_core_find_auth_info(lc,info->realm,info->username,info->domain);
|
||||
if (ai){
|
||||
ms_message("%s/%s/%s authentication fails.",info->realm,info->username,info->domain);
|
||||
/*ask again for password if auth info was already supplied but apparently not working*/
|
||||
if (lc->vtable.auth_info_requested) {
|
||||
lc->vtable.auth_info_requested(lc,info->realm,info->username,info->domain);
|
||||
LinphoneAuthInfo *ai=NULL;
|
||||
|
||||
if( info != NULL ){
|
||||
ai = (LinphoneAuthInfo*)linphone_core_find_auth_info(lc,info->realm,info->username,info->domain);
|
||||
|
||||
if (ai){
|
||||
ms_message("%s/%s/%s authentication fails.",info->realm,info->username,info->domain);
|
||||
/*ask again for password if auth info was already supplied but apparently not working*/
|
||||
if (lc->vtable.auth_info_requested) {
|
||||
lc->vtable.auth_info_requested(lc,info->realm,info->username,info->domain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void register_success(SalOp *op, bool_t registered){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue