[Asterisk-code-review] astobj2: Fix inverted check ao2 container clone. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Oct 3 08:12:45 CDT 2018
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10390 )
Change subject: astobj2: Fix inverted check ao2_container_clone.
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c
File main/astobj2_container.c:
https://gerrit.asterisk.org/#/c/10390/1/main/astobj2_container.c@771
PS1, Line 771: if (!(flags & OBJ_NOLOCK)) {
The test was not inverted.
We need to lock the clone container when the OBJ_NOLOCK flag is set. We just created the clone container. It wouldn't be locked while we were cloning the orig container's objects into it if we didn't lock it.
I suppose we should add a comment instead to indicate that the test is not inverted.
Oh. By the way, this is a case where we don't know if the clone container has a lock and what type it is.
--
To view, visit https://gerrit.asterisk.org/10390
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
Gerrit-Change-Number: 10390
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 03 Oct 2018 13:12:45 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181003/65fdf0f2/attachment.html>
More information about the asterisk-code-review
mailing list