[Asterisk-code-review] res ari applications: Fix incorrect call to ao2 lock. (asterisk[master])
Joshua C. Colp
asteriskteam at digium.com
Tue Feb 26 06:26:17 CST 2019
Joshua C. Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/11037 )
Change subject: res_ari_applications: Fix incorrect call to ao2_lock.
......................................................................
res_ari_applications: Fix incorrect call to ao2_lock.
When listing the applications the apps lock was incorrectly
locked twice instead of being locked and then unlocked.
ASTERISK-28302
Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e
---
M res/ari/resource_applications.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Joshua C. Colp: Looks good to me, approved; Approved for Submit
diff --git a/res/ari/resource_applications.c b/res/ari/resource_applications.c
index 4a97401..1d22a92 100644
--- a/res/ari/resource_applications.c
+++ b/res/ari/resource_applications.c
@@ -58,7 +58,7 @@
ao2_lock(apps);
count = ao2_container_count(apps);
ao2_callback(apps, OBJ_NOLOCK | OBJ_NODATA, append_json, json);
- ao2_lock(apps);
+ ao2_unlock(apps);
if (count != ast_json_array_size(json)) {
ast_ari_response_error(response, 500, "Internal Server Error",
--
To view, visit https://gerrit.asterisk.org/11037
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e
Gerrit-Change-Number: 11037
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190226/6194291f/attachment.html>
More information about the asterisk-code-review
mailing list