From 0dae0d3320c997a2b8c398cfb5838ed75cbd8654 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 4 Feb 2014 11:29:14 +0100 Subject: [PATCH] reset op auth count in case of io error --- coreapi/bellesip_sal/sal_impl.c | 5 ++++- tester/flexisip.conf | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 81519e542..1c2df0879 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -171,6 +171,8 @@ static void process_io_error(void *user_ctx, const belle_sip_io_error_event_t *e if (BELLE_SIP_OBJECT_IS_INSTANCE_OF(belle_sip_io_error_event_get_source(event),belle_sip_client_transaction_t)) { client_transaction=BELLE_SIP_CLIENT_TRANSACTION(belle_sip_io_error_event_get_source(event)); op = (SalOp*)belle_sip_transaction_get_application_data(BELLE_SIP_TRANSACTION(client_transaction)); + /*also reset auth count on IO error*/ + op->auth_requests=0; if (op->callbacks.process_io_error) { op->callbacks.process_io_error(op,event); } @@ -328,7 +330,8 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even op->pending_auth_transaction=NULL; } if (++op->auth_requests > 2) { - ms_warning("Auth info cannot be found for op [%s] after 2 attempts, giving up",sal_op_get_from(op)); + ms_warning("Auth info cannot be found for op [%s/%s] after 2 attempts, giving up",sal_op_get_from(op) + ,sal_op_get_to(op)); op->base.root->callbacks.auth_failure(op,op->auth_info); sal_remove_pending_auth(op->base.root,op); } else { diff --git a/tester/flexisip.conf b/tester/flexisip.conf index af571c1c3..571d90731 100755 --- a/tester/flexisip.conf +++ b/tester/flexisip.conf @@ -293,7 +293,7 @@ filter= # List of whitelist separated domain names to be managed by the # registrar. # Default value: localhost -reg-domains=localhost sip.example.org sipopen.example.org auth1.example.org sip2.linphone.org +reg-domains=localhost sip.example.org sipopen.example.org auth1.example.org sip2.linphone.org client.example.org # Maximum number of registered contacts of an address of record. # Default value: 15