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
This commit is contained in:
Russell Bryant
2007-07-02 18:19:21 +00:00
parent e7cf09b938
commit 3371051d74

View File

@@ -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;
}