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
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;
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])) {
}
}
}
+ ast_rwlock_unlock(&actionlock);
return RESULT_SUCCESS;
}