[Asterisk-code-review] ASTERISK-27041 (asterisk[13])
Frederic LE FOLL
asteriskteam at digium.com
Thu Jun 8 12:28:49 CDT 2017
Frederic LE FOLL has uploaded a new change for review. ( https://gerrit.asterisk.org/5785 )
Change subject: ASTERISK-27041
......................................................................
ASTERISK-27041
Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2
---
M main/pbx_app.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/5785/1
diff --git a/main/pbx_app.c b/main/pbx_app.c
index 1d90dac..1ce7712 100644
--- a/main/pbx_app.c
+++ b/main/pbx_app.c
@@ -396,6 +396,11 @@
struct ast_app *cur;
int cmp;
+ /* Anticipate need for conlock in unreference_cached_app(), in order to avoid
+ * possible deadlock with pbx_extension_helper()/pbx_findapp()
+ */
+ ast_rdlock_contexts();
+
AST_RWLIST_WRLOCK(&apps);
AST_RWLIST_TRAVERSE_SAFE_BEGIN(&apps, cur, list) {
cmp = strcasecmp(app, cur->name);
@@ -418,6 +423,8 @@
AST_RWLIST_TRAVERSE_SAFE_END;
AST_RWLIST_UNLOCK(&apps);
+ ast_unlock_contexts();
+
return cur ? 0 : -1;
}
--
To view, visit https://gerrit.asterisk.org/5785
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
More information about the asterisk-code-review
mailing list