diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 18:19:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 18:19:21 +0000 |
commit | 103ed228f30a37b9311ebb50e4f7b27dad1a50ab (patch) | |
tree | 0b3c87bb5507f75e2a959ba9e680ae20033502fb | |
parent | e3b358fc37b90d8e5365766f48d7463919d1ba75 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@72927 f38db490-d61c-443f-a65b-d21fe96a405b
-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 a905bc199..9ad09a906 100644 --- a/main/manager.c +++ b/main/manager.c @@ -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; } |