[Asterisk-code-review] chan_pjsip: Incorporate session reference count into transfer_refer(). (asterisk[16])

Dan Cropp asteriskteam at digium.com
Mon Dec 14 14:51:41 CST 2020


Dan Cropp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15195 )

Change subject: chan_pjsip: Incorporate session reference count into transfer_refer().
......................................................................


Patch Set 1:

(1 comment)

Patchset:

PS1: 
Is ao2_bump() safe to use in this case?  Here's what we're proposing for the channel reference:

    chan = ao2_bump(session->channel);
    if (!chan) {
        /* If there is no channel, terminate the subscription and release the session */
        pjsip_evsub_terminate(sub, PJ_FALSE);
        ao2_cleanup(session);
        return;
    }
    ...
    if (res) {
        ast_queue_control_data(chan, AST_CONTROL_TRANSFER, &message, sizeof(message));
        ao2_cleanup(session);
    }
    ...
    ao2_cleanup(chan);



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15195
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I3fd92fd14b4e3844d3d7b0f60fe417a4df5f2435
Gerrit-Change-Number: 15195
Gerrit-PatchSet: 1
Gerrit-Owner: Dan Cropp <dan at amtelco.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Mon, 14 Dec 2020 20:51:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201214/3a28d996/attachment.html>


More information about the asterisk-code-review mailing list