[asterisk-commits] russell: branch russell/ast_channel_ao2 r185844 - /team/russell/ast_channel_a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 1 13:56:06 CDT 2009


Author: russell
Date: Wed Apr  1 13:56:03 2009
New Revision: 185844

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=185844
Log:
Don't blow up if ast_active_channels() is called from the asterisk -r process

Modified:
    team/russell/ast_channel_ao2/main/channel.c

Modified: team/russell/ast_channel_ao2/main/channel.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/main/channel.c?view=diff&rev=185844&r1=185843&r2=185844
==============================================================================
--- team/russell/ast_channel_ao2/main/channel.c (original)
+++ team/russell/ast_channel_ao2/main/channel.c Wed Apr  1 13:56:03 2009
@@ -510,7 +510,7 @@
 /*! \brief returns number of active/allocated channels */
 int ast_active_channels(void)
 {
-	return ao2_container_count(channels);
+	return channels ? ao2_container_count(channels) : 0;
 }
 
 /*! \brief Cancel a shutdown in progress */




More information about the asterisk-commits mailing list