When deleting expiry, put -1 if temponly
authorMark Spencer <markster@digium.com>
Tue, 12 Oct 2004 22:29:58 +0000 (22:29 +0000)
committerMark Spencer <markster@digium.com>
Tue, 12 Oct 2004 22:29:58 +0000 (22:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3987 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 461a8dd..3f84ac9 100755 (executable)
@@ -4407,6 +4407,8 @@ static int parse_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_req
                expiry = max_expiry;
        if (!p->temponly)
                p->expire = ast_sched_add(sched, (expiry + 10) * 1000, expire_register, p);
+       else
+               p->expire = -1;
        pvt->expiry = expiry;
        snprintf(data, sizeof(data), "%s:%d:%d:%s:%s", ast_inet_ntoa(iabuf, sizeof(iabuf), p->addr.sin_addr), ntohs(p->addr.sin_port), expiry, p->username, p->fullcontact);
        ast_db_put("SIP/Registry", p->name, data);