diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-25 12:01:07 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-25 12:01:07 +0000 |
commit | 7f1e332eb9428c4544371f5f8e5bda06de35fae6 (patch) | |
tree | 099fe6a4d37cb4ae29f9a6cc9cf9b42c7c304c3a /channels/chan_sip.c | |
parent | 54aaae07e59e3af3d72fb9a5227c8b30163b62b2 (diff) |
From now on, apply maxexpiry and minexpiry to all subscriptions. Thanks to fourcheeze in the IRC channel
for pointing this out.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8642 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f2ed1f6ce..3468659ca 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10888,13 +10888,12 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req, if (p && !ast_test_flag(p, SIP_NEEDDESTROY)) { p->expiry = atoi(get_header(req, "Expires")); - /* The next 4 lines can be removed if the SNOM Expires bug is fixed */ - if (p->subscribed == DIALOG_INFO_XML) { - if (p->expiry > max_expiry) - p->expiry = max_expiry; - if (p->expiry < min_expiry) - p->expiry = min_expiry; - } + /* check if the requested expiry-time is within the approved limits from sip.conf */ + if (p->expiry > max_expiry) + p->expiry = max_expiry; + if (p->expiry < min_expiry) + p->expiry = min_expiry; + if (sipdebug || option_debug > 1) ast_log(LOG_DEBUG, "Adding subscription for extension %s context %s for peer %s\n", p->exten, p->context, p->username); if (p->autokillid > -1) |