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/branches/1.4@72926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-07-02 18:18:46 +00:00
parent 1c18332e3f
commit 76164559c9

View File

@@ -438,7 +438,6 @@ void astman_append(struct mansession *s, const char *fmt, ...)
ast_mutex_unlock(&s->__lock);
}
/*! \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;
@@ -448,6 +447,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])) {
@@ -455,6 +455,7 @@ static int handle_showmancmd(int fd, int argc, char *argv[])
}
}
}
ast_rwlock_unlock(&actionlock);
return RESULT_SUCCESS;
}