]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 232230 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 2 Dec 2009 14:55:09 +0000 (14:55 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 2 Dec 2009 14:55:09 +0000 (14:55 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r232230 | file | 2009-12-02 10:54:28 -0400 (Wed, 02 Dec 2009) | 5 lines

  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/branches/1.6.1@232231 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bbd238aa61168a08d106bde6785692b1c8aefc8e..30fdf32e533468275d7a283ed26db92958e9bb09 100644 (file)
@@ -10712,6 +10712,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... 
@@ -10720,7 +10721,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));