[Asterisk-code-review] astobj2: Fix inverted check ao2 container clone. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Tue Oct 2 17:20:49 CDT 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/10387
Change subject: astobj2: Fix inverted check ao2_container_clone.
......................................................................
astobj2: Fix inverted check ao2_container_clone.
ao2_container_clone had an inverted test for OBJ_NOLOCK.
Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
---
M main/astobj2_container.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/10387/1
diff --git a/main/astobj2_container.c b/main/astobj2_container.c
index 9bea58f..9a751e3 100644
--- a/main/astobj2_container.c
+++ b/main/astobj2_container.c
@@ -718,11 +718,11 @@
return NULL;
}
- if (flags & OBJ_NOLOCK) {
+ if (!(flags & OBJ_NOLOCK)) {
ao2_wrlock(clone);
}
failed = ao2_container_dup(clone, orig, flags);
- if (flags & OBJ_NOLOCK) {
+ if (!(flags & OBJ_NOLOCK)) {
ao2_unlock(clone);
}
if (failed) {
--
To view, visit https://gerrit.asterisk.org/10387
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
Gerrit-Change-Number: 10387
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181002/06e55c07/attachment-0001.html>
More information about the asterisk-code-review
mailing list