Commit 2fe32315 authored by smorlat's avatar smorlat
Browse files

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
parent 91fb61a6
No related merge requests found
Showing with 6 additions and 1 deletion
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment