[asterisk-commits] russell: branch group/newcdr r202646 - /team/group/newcdr/main/cel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 23 10:57:49 CDT 2009


Author: russell
Date: Tue Jun 23 10:57:46 2009
New Revision: 202646

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202646
Log:
Fix behavior of CEL logging function for events not being tracked

When we notice that configuration says we don't care about an event, actually
honor it.  Also, explicitly check to see if CEL is disabled to make the code
more clear.  cel_track_event() will actually always return false if it is
disabled, but this makes it more explicit.

Modified:
    team/group/newcdr/main/cel.c

Modified: team/group/newcdr/main/cel.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=202646&r1=202645&r2=202646
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Tue Jun 23 10:57:46 2009
@@ -479,8 +479,15 @@
 	 * process otherwise. */
 	ast_mutex_lock(&reload_lock);
 
+	if (!cel_enabled) {
+		ast_mutex_unlock(&reload_lock);
+		return;
+	}
+
 	if (!ast_cel_track_event(event_type)) {
 		ast_debug(1, "CEL event UNtracked: %s\n", ast_cel_get_type_name(event_type));
+		ast_mutex_unlock(&reload_lock);
+		return;
 	}
 
 	ast_debug(3, "CEL event tracked: %s\n", ast_cel_get_type_name(event_type));




More information about the asterisk-commits mailing list