[asterisk-commits] mmichelson: branch certified-13.1 r434220 - in /certified/branches/13.1: ./ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 7 10:35:15 CDT 2015


Author: mmichelson
Date: Tue Apr  7 10:35:13 2015
New Revision: 434220

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=434220
Log:
Do not queue message requests that we do not respond to.

If we receive a MESSAGE request that we cannot send a response
to, we should not send the incoming MESSAGE to the dialplan.

This commit should help the bouncing message_retrans test to
pass consistently.
........

Merged revisions 434218 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    certified/branches/13.1/   (props changed)
    certified/branches/13.1/res/res_pjsip_messaging.c

Propchange: certified/branches/13.1/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: certified/branches/13.1/res/res_pjsip_messaging.c
URL: http://svnview.digium.com/svn/asterisk/certified/branches/13.1/res/res_pjsip_messaging.c?view=diff&rev=434220&r1=434219&r2=434220
==============================================================================
--- certified/branches/13.1/res/res_pjsip_messaging.c (original)
+++ certified/branches/13.1/res/res_pjsip_messaging.c Tue Apr  7 10:35:13 2015
@@ -673,9 +673,16 @@
 		return PJ_TRUE;
 	}
 
-	/* send it to the messaging core */
-	ast_msg_queue(msg);
-	send_response(rdata, PJSIP_SC_ACCEPTED, NULL, NULL);
+	/* Send it to the messaging core.
+	 *
+	 * If we are unable to send a response, the most likely reason is that we
+	 * are handling a retransmission of an incoming MESSAGE and were unable to
+	 * create a transaction due to a duplicate key. If we are unable to send
+	 * a response, we should not queue the message to the dialplan
+	 */
+	if (!send_response(rdata, PJSIP_SC_ACCEPTED, NULL, NULL)) {
+		ast_msg_queue(msg);
+	}
 
 	return PJ_TRUE;
 }




More information about the asterisk-commits mailing list