[Asterisk-code-review] asterisk: Audit locking of channel when manipulating flags. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Tue May 16 09:14:26 CDT 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5624 )
Change subject: asterisk: Audit locking of channel when manipulating flags.
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.asterisk.org/#/c/5624/2/include/asterisk/channel.h
File include/asterisk/channel.h:
PS2, Line 4345: /*!
: * \since 13.17.0
: * \param Test a flag on a channel
: *
: * \param chan The channel to test the flag on
: * \param flag The flag to test
: *
: * \retval 0 flag not set
: * \retval 1 flag set
: *
: * \note This will lock the channel internally. If the channel is already
: * locked it is still safe to call.
: */
: unsigned int ast_channel_test_flag(struct ast_channel *chan, unsigned int flag);
This function isn't even needed. Testing does not have any effect on the flags as it does not change the flag state. The code testing the flag may need to have the channel locked while testing and dealing with the result but actually testing the flag doesn't require the channel to be locked.
--
To view, visit https://gerrit.asterisk.org/5624
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I489280662dba0f4c50981bfc5b5a7073fef2db10
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list