[asterisk-commits] murf: trunk r89792 - in /trunk: main/pbx.c pbx/pbx_config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 27 16:14:56 CST 2007


Author: murf
Date: Tue Nov 27 16:14:55 2007
New Revision: 89792

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89792
Log:
closes issue #11294; missed the conditional unlock of the contexts when the hash table is used instead; also, used the ast_free_ptr as advised.

Modified:
    trunk/main/pbx.c
    trunk/pbx/pbx_config.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=89792&r1=89791&r2=89792
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Nov 27 16:14:55 2007
@@ -3604,7 +3604,8 @@
 			return c;
 	}
 #endif
-	ast_unlock_contexts();
+	if (!c)
+		ast_unlock_contexts();
 
 	return c;
 }

Modified: trunk/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_config.c?view=diff&rev=89792&r1=89791&r2=89792
==============================================================================
--- trunk/pbx/pbx_config.c (original)
+++ trunk/pbx/pbx_config.c Tue Nov 27 16:14:55 2007
@@ -1000,7 +1000,7 @@
 	if (!app_data)
 		app_data="";
 	if (ast_add_extension(a->argv[5], a->argc == 7 ? 1 : 0, exten, iprior, NULL, cidmatch, app,
-		(void *)strdup(app_data), ast_free, registrar)) {
+		(void *)strdup(app_data), ast_free_ptr, registrar)) {
 		switch (errno) {
 		case ENOMEM:
 			ast_cli(a->fd, "Out of free memory\n");




More information about the asterisk-commits mailing list