Add missing CEL logging fields to various CEL backends.

Multiple revisions 350555,350571

........
  r350555 | rmudgett | 2012-01-13 11:12:51 -0600 (Fri, 13 Jan 2012) | 12 lines
  
  Add missing CEL logging fields to various CEL backends.
  
  * Add missing eventextra to cel_psql.c and cel_odbc.c.
  
  * Add missing PeerAccount and EventExtra to cel_manager.c.
  
  * Add missing userdeftype support for cel_custom.conf.sample and
  cel_sqlite3_custom.conf.sample.
  
  (closes issue ASTERISK-17190)
  Reported by: Bryant Zimmerman
........
  r350571 | rmudgett | 2012-01-13 11:23:57 -0600 (Fri, 13 Jan 2012) | 8 lines
  
  Use compatible names for event extra data for various CEL backends.
  
  * Change eventextra to extra in cel_psql.c and cel_odbc.c.
  
  * Change EventExtra to Extra in cel_manager.c.
  
  (issue ASTERISK-17190)
........

Merged revisions 350555,350571 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 350585 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-01-13 17:36:44 +00:00
parent 9c4821f468
commit 523c95e146
8 changed files with 63 additions and 22 deletions

View File

@@ -47,7 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static unsigned char cel_enabled;
/*! \brief CEL is off by default */
static const unsigned char CEL_ENALBED_DEFAULT = 0;
#define CEL_ENABLED_DEFAULT 0
/*!
* \brief which events we want to track
@@ -65,12 +65,12 @@ static int64_t eventset;
/*!
* \brief Track no events by default.
*/
static const int64_t CEL_DEFAULT_EVENTS = 0;
#define CEL_DEFAULT_EVENTS 0
/*!
* \brief Number of buckets for the appset container
*/
static const int NUM_APP_BUCKETS = 97;
#define NUM_APP_BUCKETS 97
/*!
* \brief Container of Asterisk application names
@@ -298,7 +298,7 @@ static int do_reload(void)
ast_mutex_lock(&reload_lock);
/* Reset all settings before reloading configuration */
cel_enabled = CEL_ENALBED_DEFAULT;
cel_enabled = CEL_ENABLED_DEFAULT;
eventset = CEL_DEFAULT_EVENTS;
*cel_dateformat = '\0';
ao2_callback(appset, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, NULL, NULL);
@@ -439,6 +439,9 @@ struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
}
if ((newvariable = ast_var_assign("userdeftype", record.user_defined_name))) {
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
}
if ((newvariable = ast_var_assign("eventextra", record.extra))) {
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
}