[asterisk-commits] russell: branch 1.8 r283230 - in /branches/1.8: include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 23 08:23:17 CDT 2010


Author: russell
Date: Mon Aug 23 08:23:12 2010
New Revision: 283230

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=283230
Log:
Make the AST_CEL_AMA enum match up with the AST_CDR_ ama flag values.

Really, having 2 enums for this is silly and error prone, demonstrated by
the crash that I hit because there was an assumption in the code that the
values in each matched up.  However, this is a quick fix to get them to
match up so it will work.

Modified:
    branches/1.8/include/asterisk/cel.h
    branches/1.8/main/cel.c

Modified: branches/1.8/include/asterisk/cel.h
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/cel.h?view=diff&rev=283230&r1=283229&r2=283230
==============================================================================
--- branches/1.8/include/asterisk/cel.h (original)
+++ branches/1.8/include/asterisk/cel.h Mon Aug 23 08:23:12 2010
@@ -28,8 +28,13 @@
 
 #include "asterisk/event.h"
 
-/*! \brief AMA Flags */
+/*!
+ * \brief AMA Flags
+ *
+ * \note This must much up with the AST_CDR_* defines for AMA flags.
+ */
 enum ast_cel_ama_flag {
+	AST_CEL_AMA_FLAG_NONE,
 	AST_CEL_AMA_FLAG_OMIT,
 	AST_CEL_AMA_FLAG_BILLING,
 	AST_CEL_AMA_FLAG_DOCUMENTATION,

Modified: branches/1.8/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/cel.c?view=diff&rev=283230&r1=283229&r2=283230
==============================================================================
--- branches/1.8/main/cel.c (original)
+++ branches/1.8/main/cel.c Mon Aug 23 08:23:12 2010
@@ -122,6 +122,7 @@
  * \brief Map of ast_cel_ama_flags to strings
  */
 static const char * const cel_ama_flags[AST_CEL_AMA_FLAG_TOTAL] = {
+	[AST_CEL_AMA_FLAG_NONE]          = "NONE",
 	[AST_CEL_AMA_FLAG_OMIT]          = "OMIT",
 	[AST_CEL_AMA_FLAG_BILLING]       = "BILLING",
 	[AST_CEL_AMA_FLAG_DOCUMENTATION] = "DOCUMENTATION",




More information about the asterisk-commits mailing list