{
LinphoneAuthInfo *ai;
MSList *elem;
+ MSList *l;
/* find if we are attempting to modify an existing auth info */
ai=(LinphoneAuthInfo*)linphone_core_find_auth_info(lc,info->realm,info->username);
}
lc->auth_info=ms_list_append(lc->auth_info,linphone_auth_info_clone(info));
/* retry pending authentication operations */
- for(elem=sal_get_pending_auths(lc->sal);elem!=NULL;elem=elem->next){
+ for(l=elem=sal_get_pending_auths(lc->sal);elem!=NULL;elem=elem->next){
const char *username,*realm;
SalOp *op=(SalOp*)elem->data;
LinphoneAuthInfo *ai;
ai->usecount++;
}
}
+ ms_list_free(l);
}
return TRUE;
}
if (get_auth_data(ev,&realm,&username)==0){
- if (op->pending_auth!=NULL)
+ if (op->pending_auth!=NULL){
eXosip_event_free(op->pending_auth);
- op->pending_auth=ev;
- sal_add_pending_auth (sal,op);
+ op->pending_auth=ev;
+ }else{
+ op->pending_auth=ev;
+ sal_add_pending_auth(sal,op);
+ }
+
sal->callbacks.auth_requested(op,realm,username);
return FALSE;
}