[asterisk-commits] mmichelson: trunk r95578 - in /trunk: ./ main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Dec 31 17:44:46 CST 2007
Author: mmichelson
Date: Mon Dec 31 17:44:45 2007
New Revision: 95578
URL: http://svn.digium.com/view/asterisk?view=rev&rev=95578
Log:
Merged revisions 95577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r95577 | mmichelson | 2007-12-31 17:43:13 -0600 (Mon, 31 Dec 2007) | 9 lines
Avoiding a potentially bad locking situation. ast_merge_contexts_and_delete writelocks the conlock, then
calls ast_hint_extension, which attempts to readlock the same lock. Recursion with read-write locks is
dangerous, so the inner lock needs to be removed. I did this by copying the "guts" of ast_hint_extension
into ast_merge_contexts_and_delete (sans the extra lock).
(this change is inspired by the locking problems seen in issue #11080, but I have no idea if this is the
problematic area experienced by the reporters of that issue)
........
Modified:
trunk/ (props changed)
trunk/main/pbx.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=95578&r1=95577&r2=95578
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Mon Dec 31 17:44:45 2007
@@ -5211,7 +5211,8 @@
cannot be restored
*/
while ((this = AST_LIST_REMOVE_HEAD(&store, list))) {
- exten = ast_hint_extension(NULL, this->context, this->exten);
+ struct pbx_find_info q = { .stacklen = 0 };
+ exten = pbx_find_extension(NULL, NULL, &q, this->context, this->exten, PRIORITY_HINT, NULL, "", E_MATCH);
/* Find the hint in the list of hints */
AST_RWLIST_TRAVERSE(&hints, hint, list) {
if (hint->exten == exten)
More information about the asterisk-commits
mailing list