diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-07-09 11:03:33 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-07-09 11:03:33 +0000 |
commit | 56d2a5ac88c9a5390851f7f4a8fd21beeca1efe0 (patch) | |
tree | 612184cd7bcf3487dc2cde155d8e8018554b497c | |
parent | 76941d2eb82c6fb67337eb24cf816a7827db7f18 (diff) |
Expire time fix (bug #1996)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3413 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index dc34f3ee0..6fb29092e 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6463,8 +6463,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ contact = __get_header(req, "Contact", &start); /* this loop ensures we get a contact header about our register request */ if(!ast_strlen_zero(contact)) { - if(strstr(contact, p->our_contact)) + if( (tmptmp=strstr(contact, p->our_contact))) { + contact=tmptmp; break; + } } else break; } @@ -6483,6 +6485,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ else expires_ms -= EXPIRY_GUARD_SECS * 1000; + r->refresh= (int) expires_ms / 1000; r->expire=ast_sched_add(sched, expires_ms, sip_reregister, r); } else ast_log(LOG_WARNING, "Got 200 OK on REGISTER that isn't a register\n"); |