Commit 928c1059 authored by Mikhail Zabaluev's avatar Mikhail Zabaluev Committed by Pekka Pessi
Browse files

Don't use the Min-Expires value with the stale contacts.

parent 8e65c525
......@@ -780,12 +780,14 @@ int nua_register_client_request(nua_client_request_t *cr,
/* Remove the expire parameters from contacts */
msg_header_remove_param(m->m_common, "expires");
}
else if (nr && nr->nr_min_expires &&
strtoul(m->m_expires, 0, 10) < nr->nr_min_expires) {
if (min_expires == NULL)
min_expires = su_sprintf(msg_home(msg), "expires=%lu",
nr->nr_min_expires);
msg_header_replace_param(msg_home(msg), m->m_common, min_expires);
else if (nr && nr->nr_min_expires) {
unsigned long exp = strtoul(m->m_expires, 0, 10);
if (exp != 0 && exp < nr->nr_min_expires) {
if (min_expires == NULL)
min_expires = su_sprintf(msg_home(msg), "expires=%lu",
nr->nr_min_expires);
msg_header_replace_param(msg_home(msg), m->m_common, min_expires);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment