mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
Merge "chan_sip: Fix SUBSCRIBE with missing "Expires" header."
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user