[svn-commits] russell: trunk r302786 - in /trunk: ./ main/manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jan 19 16:36:35 CST 2011
Author: russell
Date: Wed Jan 19 16:36:30 2011
New Revision: 302786
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=302786
Log:
Merged revisions 302785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r302785 | russell | 2011-01-19 16:35:15 -0600 (Wed, 19 Jan 2011) | 15 lines
Resolve a memory leak with the manager interface is disabled.
The intent of this check as it stands in previous versions of Asterisk was to
check if there are any active sessions. If there were no sessions, then the
function would return immediately and not bother with queueing up the manager
event to be processed. Since the conversion of storing sessions in an astobj2
container, this check will always pass. I changed it to go back to checking
what was intended.
The side effect of this was that if the AMI is disabled, the manager event
queue is populated anyway, but the code that runs to clear out the queue
never runs. A producer with no consumer is a bad thing.
Reported internally by kmorgan.
........
Modified:
trunk/ (props changed)
trunk/main/manager.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=302786&r1=302785&r2=302786
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Wed Jan 19 16:36:30 2011
@@ -4781,7 +4781,7 @@
struct ast_str *buf;
int i;
- if (!sessions && AST_RWLIST_EMPTY(&manager_hooks)) {
+ if (!ao2_container_count(sessions) && AST_RWLIST_EMPTY(&manager_hooks)) {
return 0;
}
More information about the svn-commits
mailing list