[asterisk-commits] rmudgett: trunk r432579 - in /trunk: ./ res/res_pjsip_refer.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 6 16:18:29 CST 2015


Author: rmudgett
Date: Fri Mar  6 16:18:28 2015
New Revision: 432579

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432579
Log:
res_pjsip_refer: Made refer_attended_alloc() not create the ao2 object with a lock.

The lock is unused.
........

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

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

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/res_pjsip_refer.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_refer.c?view=diff&rev=432579&r1=432578&r2=432579
==============================================================================
--- trunk/res/res_pjsip_refer.c (original)
+++ trunk/res/res_pjsip_refer.c Fri Mar  6 16:18:28 2015
@@ -408,7 +408,7 @@
 	/*! \brief Transferer channel */
 	struct ast_channel *transferer_chan;
 	/*! \brief Second transferer session */
-	struct ast_sip_session *transferer_second	;
+	struct ast_sip_session *transferer_second;
 	/*! \brief Optional refer progress structure */
 	struct refer_progress *progress;
 };
@@ -425,11 +425,14 @@
 }
 
 /*! \brief Allocator for attended transfer task */
-static struct refer_attended *refer_attended_alloc(struct ast_sip_session *transferer, struct ast_sip_session *transferer_second,
+static struct refer_attended *refer_attended_alloc(struct ast_sip_session *transferer,
+	struct ast_sip_session *transferer_second,
 	struct refer_progress *progress)
 {
-	struct refer_attended *attended = ao2_alloc(sizeof(*attended), refer_attended_destroy);
-
+	struct refer_attended *attended;
+
+	attended = ao2_alloc_options(sizeof(*attended), refer_attended_destroy,
+		AO2_ALLOC_OPT_LOCK_NOLOCK);
 	if (!attended) {
 		return NULL;
 	}




More information about the asterisk-commits mailing list