[svn-commits] file: trunk r232230 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 2 08:54:33 CST 2009


Author: file
Date: Wed Dec  2 08:54:28 2009
New Revision: 232230

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=232230
Log:
Fix a bug where a scheduled item ID would get retained on registrations in a certain scenario
causing code to execute during reload that should not.

(issue AST-263)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=232230&r1=232229&r2=232230
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Dec  2 08:54:28 2009
@@ -12121,6 +12121,7 @@
 		r->call = dialog_unref(r->call, "unrefing r->call");
 	}
 	/* If we have a limit, stop registration and give up */
+	r->timeout = -1;
 	if (global_regattempts_max && r->regattempts > global_regattempts_max) {
 		/* Ok, enough is enough. Don't try any more */
 		/* We could add an external notification here...
@@ -12129,7 +12130,6 @@
 		r->regstate = REG_STATE_FAILED;
 	} else {
 		r->regstate = REG_STATE_UNREGISTERED;
-		r->timeout = -1;
 		res=transmit_register(r, SIP_REGISTER, NULL, NULL);
 	}
 	manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: SIP\r\nUsername: %s\r\nDomain: %s\r\nStatus: %s\r\n", r->username, r->hostname, regstate2str(r->regstate));




More information about the svn-commits mailing list