summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-07-02 18:19:21 +0000
committerRussell Bryant <russell@russellbryant.com>2007-07-02 18:19:21 +0000
commit3371051d74e30aa3177d3aa1d92988f1408b5556 (patch)
tree0b3c87bb5507f75e2a959ba9e680ae20033502fb /main/manager.c
parente7cf09b93842ca7dc60aa43297c1c0c96021e1cd (diff)
Merged revisions 72926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72926 | russell | 2007-07-02 13:18:46 -0500 (Mon, 02 Jul 2007) | 3 lines Remove a bogus comment and add proper locking to the handler function for the CLI command to show information on manager actions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c
index a905bc199..9ad09a906 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -491,7 +491,6 @@ static int manager_displayconnects (struct mansession *s)
return ret;
}
-/*! \note The actionlock is read-locked by the caller of this function */
static int handle_showmancmd(int fd, int argc, char *argv[])
{
struct manager_action *cur;
@@ -501,6 +500,7 @@ static int handle_showmancmd(int fd, int argc, char *argv[])
if (argc != 4)
return RESULT_SHOWUSAGE;
+ ast_rwlock_rdlock(&actionlock);
for (cur = first_action; cur; cur = cur->next) { /* Walk the list of actions */
for (num = 3; num < argc; num++) {
if (!strcasecmp(cur->action, argv[num])) {
@@ -511,6 +511,7 @@ static int handle_showmancmd(int fd, int argc, char *argv[])
}
}
}
+ ast_rwlock_unlock(&actionlock);
return RESULT_SUCCESS;
}