]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make the AST_CEL_AMA enum match up with the AST_CDR_ ama flag values.
authorRussell Bryant <russell@russellbryant.com>
Mon, 23 Aug 2010 13:23:12 +0000 (13:23 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 23 Aug 2010 13:23:12 +0000 (13:23 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@283230 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/cel.h
main/cel.c

index f221dd643828aa6b49961782bd529f29b1b1f32f..353c0611052939c25882deb244506bb8a100ffa7 100644 (file)
@@ -28,8 +28,13 @@ extern "C" {
 
 #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,
index 750a629667608f00dde5394b90f3c20110766eeb..7f5c24f404781115bbf99dbb2bde10b4161be85a 100644 (file)
@@ -122,6 +122,7 @@ static const char * const cel_event_types[CEL_MAX_EVENT_IDS] = {
  * \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",