[asterisk-commits] file: branch group/pimp_my_sip r383914 - /team/group/pimp_my_sip/res/res_sip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 26 13:24:56 CDT 2013


Author: file
Date: Tue Mar 26 13:24:53 2013
New Revision: 383914

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383914
Log:
Don't attempt to authenticate ACKs.

Modified:
    team/group/pimp_my_sip/res/res_sip/sip_distributor.c

Modified: team/group/pimp_my_sip/res/res_sip/sip_distributor.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip/sip_distributor.c?view=diff&rev=383914&r1=383913&r2=383914
==============================================================================
--- team/group/pimp_my_sip/res/res_sip/sip_distributor.c (original)
+++ team/group/pimp_my_sip/res/res_sip/sip_distributor.c Tue Mar 26 13:24:53 2013
@@ -132,10 +132,11 @@
 static pj_bool_t authenticate(pjsip_rx_data *rdata)
 {
 	RAII_VAR(struct ast_sip_endpoint *, endpoint, ast_pjsip_rdata_get_endpoint(rdata), ao2_cleanup);
+	int is_ack = rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD;
 
 	ast_assert(endpoint != NULL);
 
-	if (ast_sip_requires_authentication(endpoint, rdata)) {
+	if (!is_ack && ast_sip_requires_authentication(endpoint, rdata)) {
 		pjsip_tx_data *tdata;
 		pjsip_endpt_create_response(ast_sip_get_pjsip_endpoint(), rdata, 401, NULL, &tdata);
 		switch (ast_sip_check_authentication(endpoint, rdata, tdata)) {




More information about the asterisk-commits mailing list