mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
change a bit the way Registration failures are notified.
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@791 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
91fb61a6f9
commit
2fe3231522
2 changed files with 6 additions and 1 deletions
|
|
@ -362,10 +362,12 @@ void linphone_process_authentication(LinphoneCore *lc, eXosip_event_t *ev)
|
|||
osip_www_authenticate_t *www_auth;
|
||||
osip_message_t *resp=ev->response;
|
||||
char *username;
|
||||
|
||||
|
||||
/*
|
||||
if (strcmp(ev->request->sip_method,"REGISTER")==0) {
|
||||
gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication required");
|
||||
}
|
||||
*/
|
||||
|
||||
username=osip_uri_get_username(resp->from->url);
|
||||
prx_auth=(osip_proxy_authenticate_t*)osip_list_get(&resp->proxy_authenticates,0);
|
||||
|
|
|
|||
|
|
@ -624,6 +624,9 @@ void linphone_proxy_config_process_authentication_failure(LinphoneCore *lc, eXos
|
|||
LinphoneProxyConfig *cfg=linphone_core_get_proxy_config_from_rid(lc, ev->rid);
|
||||
if (cfg){
|
||||
cfg->auth_failures++;
|
||||
if (strcmp(ev->request->sip_method,"REGISTER")==0) {
|
||||
gstate_new_state(lc, GSTATE_REG_FAILED, "Authentication failed.");
|
||||
}
|
||||
/*restart a new register so that the user gets a chance to be prompted for a password*/
|
||||
if (cfg->auth_failures==1){
|
||||
linphone_proxy_config_register(cfg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue