[svn-commits] file: trunk r403222 - in /trunk: ./ res/res_pjsip_header_funcs.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 27 19:56:54 CST 2013


Author: file
Date: Wed Nov 27 19:56:52 2013
New Revision: 403222

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403222
Log:
res_pjsip_header_funcs: Don't add headers to re-INVITEs.

When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.

This changes the module so it will no longer add headers to
re-INVITEs.

(closes issue ASTERISK-22882)
Reported by: David M. Lee
........

Merged revisions 403221 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_header_funcs.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Wed Nov 27 19:56:52 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403175,403179,403207,403209
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403175,403179,403207,403209,403221

Modified: trunk/res/res_pjsip_header_funcs.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_header_funcs.c?view=diff&rev=403222&r1=403221&r2=403222
==============================================================================
--- trunk/res/res_pjsip_header_funcs.c (original)
+++ trunk/res/res_pjsip_header_funcs.c Wed Nov 27 19:56:52 2013
@@ -583,7 +583,8 @@
 	RAII_VAR(struct ast_datastore *, datastore,
 			 ast_sip_session_get_datastore(session, header_datastore.type), ao2_cleanup);
 
-	if (!datastore || !datastore->data) {
+	if (!datastore || !datastore->data ||
+		(session->inv_session->state >= PJSIP_INV_STATE_CONFIRMED)) {
 		return;
 	}
 




More information about the svn-commits mailing list