[asterisk-commits] russell: trunk r72927 - in /trunk: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 2 13:19:22 CDT 2007


Author: russell
Date: Mon Jul  2 13:19:21 2007
New Revision: 72927

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72927
Log:
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.

........

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=72927&r1=72926&r2=72927
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jul  2 13:19:21 2007
@@ -491,7 +491,6 @@
 	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 @@
 	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 @@
 			}
 		}
 	}
+	ast_rwlock_unlock(&actionlock);
 
 	return RESULT_SUCCESS;
 }




More information about the asterisk-commits mailing list