diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 18:18:46 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 18:18:46 +0000 |
commit | e91e4df8d5089c7776703ffc3365d00d0d1faa51 (patch) | |
tree | 95241a0a6c5c8cfb32b2a63330ec80872835f8d3 /main | |
parent | 1df1cd61a87f9b522adb09c87c20073785104970 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@72926 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/manager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c index 0b20fafba..4f53663be 100644 --- a/main/manager.c +++ b/main/manager.c @@ -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; } |