res_pjsip_refer: Made refer_attended_alloc() not create the ao2 object with a lock.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 6 Mar 2015 22:18:28 +0000 (22:18 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 6 Mar 2015 22:18:28 +0000 (22:18 +0000)
The lock is unused.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432579 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_refer.c

index 6c79b4d..bc4e0e7 100644 (file)
@@ -408,7 +408,7 @@ struct refer_attended {
        /*! \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 @@ static void refer_attended_destroy(void *obj)
 }
 
 /*! \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;
        }