[asterisk-commits] file: trunk r57519 - /trunk/main/pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 2 11:05:29 MST 2007


Author: file
Date: Fri Mar  2 12:05:29 2007
New Revision: 57519

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57519
Log:
Don't try to do recursive locking/unlocking when it isn't supported.

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=57519&r1=57518&r2=57519
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Fri Mar  2 12:05:29 2007
@@ -5228,7 +5228,6 @@
 	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 @@
 		/* if we have a specific match, we are done, otherwise continue */
 		tmp = con ? NULL : next;
 	}
+}
+
+void ast_context_destroy(struct ast_context *con, const char *registrar)
+{
+	ast_wrlock_contexts();
+	__ast_context_destroy(con,registrar);
 	ast_unlock_contexts();
-}
-
-void ast_context_destroy(struct ast_context *con, const char *registrar)
-{
-	__ast_context_destroy(con,registrar);
 }
 
 static void wait_for_hangup(struct ast_channel *chan, void *data)



More information about the asterisk-commits mailing list