diff options
author | Joshua Colp <jcolp@digium.com> | 2009-12-02 14:54:28 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2009-12-02 14:54:28 +0000 |
commit | 23781604aa3cf1ddb356570e4c0bd8fefe1e8940 (patch) | |
tree | 008e48b60b60000375522602654b3036fd60675c | |
parent | bc0b4f40fede436defa936977b6e03d399b33dc1 (diff) |
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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@232230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index eab73f7b8..410bee77e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12121,6 +12121,7 @@ static int sip_reg_timeout(const void *data) 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 @@ static int sip_reg_timeout(const void *data) 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)); |