[asterisk-commits] trunk r14519 - /trunk/pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 23 14:16:47 MST 2006


Author: kpfleming
Date: Thu Mar 23 15:16:46 2006
New Revision: 14519

URL: http://svn.digium.com/view/asterisk?rev=14519&view=rev
Log:
ensure global variables lock is held during 'show globals' CLI command

Modified:
    trunk/pbx.c

Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=14519&r1=14518&r2=14519&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Thu Mar 23 15:16:46 2006
@@ -3423,12 +3423,14 @@
 	int i = 0;
 	struct ast_var_t *newvariable;
 
+	ast_mutex_lock(&globalslock);
 	AST_LIST_TRAVERSE (&globals, newvariable, entries) {
 		i++;
 		ast_cli(fd, "   %s=%s\n", ast_var_name(newvariable), ast_var_value(newvariable));
 	}
-	/* ... we have applications ... */
+	ast_mutex_unlock(&globalslock);
 	ast_cli(fd, "\n    -- %d variables\n", i);
+
 	return RESULT_SUCCESS;
 }
 



More information about the asterisk-commits mailing list