diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-23 21:16:46 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-23 21:16:46 +0000 |
commit | 4de046e80d2b6d13ec4c1f727cf697bfbedecdfe (patch) | |
tree | 322cfcc65417106a2a57d9d00663e9b126296733 /pbx.c | |
parent | 2fab0b4a84ce12b5293fa174d47ee7e78a0e92b4 (diff) |
ensure global variables lock is held during 'show globals' CLI command
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14519 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3423,12 +3423,14 @@ static int handle_show_globals(int fd, int argc, char *argv[]) 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; } |