aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-01 15:12:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-01 15:12:32 +0000
commit0608f5599ec15387b36dbbfc36de3bb1b9ef2936 (patch)
tree86d2f164fa919962b4c41d1cf26b2efb0ad58343 /pbx.c
parent3ad80589776fbd4dfc612850903d07b2a837af9e (diff)
add missing locking of the dialplan functions list in the "show functions"
CLI command git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@23951 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 183a0acda..7cd94e6d2 100644
--- a/pbx.c
+++ b/pbx.c
@@ -1172,10 +1172,12 @@ static int handle_show_functions(int fd, int argc, char *argv[])
int count_acf = 0;
ast_cli(fd, "Installed Custom Functions:\n--------------------------------------------------------------------------------\n");
+ ast_mutex_lock(&acflock);
for (acf = acf_root ; acf; acf = acf->next) {
ast_cli(fd, "%-20.20s %-35.35s %s\n", acf->name, acf->syntax, acf->synopsis);
count_acf++;
}
+ ast_mutex_unlock(&acflock);
ast_cli(fd, "%d custom functions installed.\n", count_acf);
return 0;
}