[Asterisk-code-review] parking: Use channel snapshot instead of channel. (asterisk[13])

George Joseph asteriskteam at digium.com
Tue Nov 12 10:56:35 CST 2019


George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13173 )

Change subject: parking: Use channel snapshot instead of channel.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/13173/1/res/parking/parking_bridge.c 
File res/parking/parking_bridge.c:

https://gerrit.asterisk.org/c/asterisk/+/13173/1/res/parking/parking_bridge.c@266 
PS1, Line 266: 	parker = ast_channel_snapshot_get_latest(park_datastore->parker_uuid);
I forget, can get_latest return a snapshot for a channel that doesn't exist anymore?  If it does,  is the snapshot still useful for this situation?  Since all we ever use out of parker is the name, and we compare it to bridge_channel->chan, could we just compare park_datastore->parker_uuid to 
bridge_channel->chan's uuid?


https://gerrit.asterisk.org/c/asterisk/+/13173/1/res/parking/parking_bridge.c@285 
PS1, Line 285: parker
Any reason to not just pass parker->name since that's all that's used by the other functions?  You can also get rid of the RAII for parker if you just do an ao2_cleanup right after this call before the test for pu.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I68ceb1d62c7378addcd286e21be08a660a7cecf2
Gerrit-Change-Number: 13173
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Tue, 12 Nov 2019 16:56:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191112/040e76bc/attachment-0001.html>


More information about the asterisk-code-review mailing list