[asterisk-commits] file: branch group/pimp_my_sip r388938 - /team/group/pimp_my_sip/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 16 18:46:44 CDT 2013
Author: file
Date: Thu May 16 18:46:42 2013
New Revision: 388938
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388938
Log:
Fix a bug where the Expires header was not checked when the '*' Contact was used.
(closes issue AST-1155)
Reported by: John Bigelow
Modified:
team/group/pimp_my_sip/res/res_sip_registrar.c
Modified: team/group/pimp_my_sip/res/res_sip_registrar.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_registrar.c?view=diff&rev=388938&r1=388937&r2=388938
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_registrar.c (original)
+++ team/group/pimp_my_sip/res/res_sip_registrar.c Thu May 16 18:46:42 2013
@@ -90,12 +90,12 @@
}
while ((contact = (pjsip_contact_hdr *) pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, contact->next))) {
- int expiration;
+ int expiration = registrar_get_expiration(aor, contact, rdata);
RAII_VAR(struct ast_sip_contact *, existing, NULL, ao2_cleanup);
if (contact->star) {
/* The expiration MUST be 0 when a '*' contact is used and there must be no other contact */
- if ((contact->expires != 0) || previous) {
+ if ((expiration != 0) || previous) {
pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), details.pool);
return -1;
}
@@ -111,7 +111,6 @@
}
details.uri = pjsip_uri_get_uri(contact->uri);
- expiration = registrar_get_expiration(aor, contact, rdata);
/* Determine if this is an add, update, or delete for policy enforcement purposes */
if (!(existing = ao2_callback(contacts, 0, registrar_find_contact, &details))) {
More information about the asterisk-commits
mailing list