[Asterisk-code-review] res ari applications: Fix incorrect call to ao2 lock. (asterisk[13])

Joshua C. Colp asteriskteam at digium.com
Mon Feb 25 06:11:45 CST 2019


Joshua C. Colp has uploaded this change for review. ( https://gerrit.asterisk.org/11035


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/11035/1

diff --git a/res/ari/resource_applications.c b/res/ari/resource_applications.c
index 061d6b4..6c9bd5c 100644
--- a/res/ari/resource_applications.c
+++ b/res/ari/resource_applications.c
@@ -60,7 +60,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/11035
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e
Gerrit-Change-Number: 11035
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua C. Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190225/2fc87cb1/attachment.html>


More information about the asterisk-code-review mailing list