Skip to content
Snippets Groups Projects
Commit 0436fe18 authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "chan_sip: Fix SUBSCRIBE with missing "Expires" header."

parents 61aeeb6d 6474de5f
No related branches found
No related tags found
No related merge requests found
......@@ -28672,7 +28672,13 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
p->lastinvite = seqno;
}
if (!p->needdestroy) {
p->expiry = atoi(sip_get_header(req, "Expires"));
const char *expires_str = sip_get_header(req, "Expires");
if (ast_strlen_zero(expires_str)) {
p->expiry = default_expiry;
} else {
p->expiry = atoi(expires_str);
}
 
/* check if the requested expiry-time is within the approved limits from sip.conf */
if (p->expiry > max_subexpiry) {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment