[asterisk-commits] kmoore: branch kmoore/retry_forbidden r399498 - /team/kmoore/retry_forbidden/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 19 15:48:30 CDT 2013
Author: kmoore
Date: Thu Sep 19 15:48:28 2013
New Revision: 399498
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399498
Log:
Partially function chan_sip implementation (cached nonce not cleared yet)
Modified:
team/kmoore/retry_forbidden/channels/chan_sip.c
Modified: team/kmoore/retry_forbidden/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/retry_forbidden/channels/chan_sip.c?view=diff&rev=399498&r1=399497&r2=399498
==============================================================================
--- team/kmoore/retry_forbidden/channels/chan_sip.c (original)
+++ team/kmoore/retry_forbidden/channels/chan_sip.c Thu Sep 19 15:48:28 2013
@@ -23778,7 +23778,6 @@
switch (resp) {
case 401: /* Unauthorized */
-handle_401:
if (p->authtries == MAX_AUTHTRIES || do_register_auth(p, req, resp)) {
ast_log(LOG_NOTICE, "Failed to authenticate on REGISTER to '%s@%s' (Tries %d)\n", p->registry->username, p->registry->hostname, p->authtries);
pvt_set_needdestroy(p, "failed to authenticate REGISTER");
@@ -23786,14 +23785,16 @@
break;
case 403: /* Forbidden */
if (global_reg_retry_403) {
- ast_log(LOG_NOTICE, "Handling 403 response to REGISTER as 401 for %s@%s\n", p->registry->username, p->registry->hostname);
- goto handle_401;
- }
- ast_log(LOG_WARNING, "Forbidden - wrong password on authentication for REGISTER for '%s' to '%s'\n", p->registry->username, p->registry->hostname);
- AST_SCHED_DEL_UNREF(sched, r->timeout, registry_unref(r, "reg ptr unref from handle_response_register 403"));
- r->regstate = REG_STATE_NOAUTH;
- sip_publish_registry(r->username, r->hostname, regstate2str(r->regstate));
- pvt_set_needdestroy(p, "received 403 response");
+ ast_log(LOG_NOTICE, "Treating 403 response to REGISTER as non-fatal for %s@%s\n",
+ p->registry->username, p->registry->hostname);
+ } else {
+ ast_log(LOG_WARNING, "Forbidden - wrong password on authentication for REGISTER for '%s' to '%s'\n",
+ p->registry->username, p->registry->hostname);
+ AST_SCHED_DEL_UNREF(sched, r->timeout, registry_unref(r, "reg ptr unref from handle_response_register 403"));
+ r->regstate = REG_STATE_NOAUTH;
+ sip_publish_registry(r->username, r->hostname, regstate2str(r->regstate));
+ pvt_set_needdestroy(p, "received 403 response");
+ }
break;
case 404: /* Not found */
ast_log(LOG_WARNING, "Got 404 Not found on SIP register to service %s@%s, giving up\n", p->registry->username, p->registry->hostname);
More information about the asterisk-commits
mailing list