[svn-commits] tilghman: branch 1.6.1 r152690 - in /branches/1.6.1: ./ main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 29 19:54:38 CDT 2008


Author: tilghman
Date: Wed Oct 29 19:54:37 2008
New Revision: 152690

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152690
Log:
Merged revisions 152689 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r152689 | tilghman | 2008-10-29 19:45:47 -0500 (Wed, 29 Oct 2008) | 2 lines
  
  Track down and fix annoying lock errors
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/pbx.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/pbx.c?view=diff&rev=152690&r1=152689&r2=152690
==============================================================================
--- branches/1.6.1/main/pbx.c (original)
+++ branches/1.6.1/main/pbx.c Wed Oct 29 19:54:37 2008
@@ -3229,15 +3229,18 @@
 }
 
 /*! \brief Find hint for given extension in context */
+static struct ast_exten *ast_hint_extension_nolock(struct ast_channel *c, const char *context, const char *exten)
+{
+	struct pbx_find_info q = { .stacklen = 0 }; /* the rest is set in pbx_find_context */
+	return pbx_find_extension(c, NULL, &q, context, exten, PRIORITY_HINT, NULL, "", E_MATCH);
+}
+
 static struct ast_exten *ast_hint_extension(struct ast_channel *c, const char *context, const char *exten)
 {
 	struct ast_exten *e;
-	struct pbx_find_info q = { .stacklen = 0 }; /* the rest is set in pbx_find_context */
-
 	ast_rdlock_contexts();
-	e = pbx_find_extension(c, NULL, &q, context, exten, PRIORITY_HINT, NULL, "", E_MATCH);
+	e = ast_hint_extension_nolock(c, context, exten);
 	ast_unlock_contexts();
-
 	return e;
 }
 
@@ -6033,7 +6036,8 @@
 		if (exten && exten->exten[0] == '_') {
 			ast_add_extension(exten->parent->name, 0, this->exten, PRIORITY_HINT, NULL,
 				0, exten->app, ast_strdup(exten->data), ast_free_ptr, registrar);
-			exten = ast_hint_extension(NULL, this->context, this->exten);
+			/* rwlocks are not recursive locks */
+			exten = ast_hint_extension_nolock(NULL, this->context, this->exten);
 		}
 
 		/* Find the hint in the list of hints */




More information about the svn-commits mailing list