diff options
author | Joshua Colp <jcolp@digium.com> | 2007-03-02 18:05:29 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-03-02 18:05:29 +0000 |
commit | 96693aca99475ff511d409779cd2077fd3067893 (patch) | |
tree | e80cd7151761c2128f13af2a06257dc83c763dc3 /main/pbx.c | |
parent | e23433e50ed8f23af594a756b3bbfb08ae865a13 (diff) |
Don't try to do recursive locking/unlocking when it isn't supported.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c index d940e52c0..f0a3f3657 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5228,7 +5228,6 @@ void __ast_context_destroy(struct ast_context *con, const char *registrar) struct ast_exten *e, *el, *en; struct ast_ignorepat *ipi; - ast_wrlock_contexts(); for (tmp = contexts; tmp; ) { struct ast_context *next; /* next starting point */ for (; tmp; tmpl = tmp, tmp = tmp->next) { @@ -5278,12 +5277,13 @@ void __ast_context_destroy(struct ast_context *con, const char *registrar) /* if we have a specific match, we are done, otherwise continue */ tmp = con ? NULL : next; } - ast_unlock_contexts(); } void ast_context_destroy(struct ast_context *con, const char *registrar) { + ast_wrlock_contexts(); __ast_context_destroy(con,registrar); + ast_unlock_contexts(); } static void wait_for_hangup(struct ast_channel *chan, void *data) |