]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
When we get a 408 Timeout, don't stop trying to re-register.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 27 Jun 2008 22:01:09 +0000 (22:01 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 27 Jun 2008 22:01:09 +0000 (22:01 +0000)
(closes issue #12863)
 Reported by: ricvil

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@126056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 20560afc23af2cbc1822d84dfaa832018b1d88b1..8a4ad80149ed510a181f36e949c1a105fb3359dc 100644 (file)
@@ -12575,9 +12575,8 @@ static int handle_response_register(struct sip_pvt *p, int resp, char *rest, str
                }
                break;
        case 408:       /* Request timeout */
-               ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);    
-               r->call = NULL;
-               AST_SCHED_DEL(sched, r->timeout);
+               /* Got a timeout response, so reset the counter of failed responses */
+               r->regattempts = 0;
                break;
        case 479:       /* SER: Not able to process the URI - address is wrong in register*/
                ast_log(LOG_WARNING, "Got error 479 on register to %s@%s, giving up (check config)\n", p->registry->username,p->registry->hostname);