From f33093e82b140d98b4f0739a79369be5d0a3eff3 Mon Sep 17 00:00:00 2001 From: smorlat Date: Wed, 2 Sep 2009 09:55:48 +0000 Subject: [PATCH] fix bug in previous commit about register retries. git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@619 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/coreapi/exevents.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/linphone/coreapi/exevents.c b/linphone/coreapi/exevents.c index 0cd7b4364..4e0810286 100644 --- a/linphone/coreapi/exevents.c +++ b/linphone/coreapi/exevents.c @@ -943,15 +943,13 @@ void linphone_registration_faillure(LinphoneCore *lc, eXosip_event_t *ev){ case 407: linphone_process_authentication(lc,ev); break; - case 403: + default: cfg=linphone_core_get_proxy_config_from_rid(lc,ev->rid); /* if contact is up to date, process the failure, otherwise resend a new register with updated contact first, just in case the faillure is due to incorrect contact */ - if (!linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response)){ - linphone_proxy_config_process_authentication_failure(lc,ev); - return; - } - default: + if (linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response)) + return; /*we are retrying with an updated contact*/ + if (status_code==403) linphone_proxy_config_process_authentication_failure(lc,ev); osip_uri_to_str(requri,&ru); msg=ortp_strdup_printf(_("Registration on %s failed: %s"),ru,(reason!=NULL) ? reason : _("no response timeout")); lc->vtable.display_status(lc,msg);