mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 17:27:02 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user