summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-01-13 17:36:44 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-01-13 17:36:44 +0000
commit523c95e1463553e8d9817a6ea2c2024384247149 (patch)
tree05ffcc9e6c9327f0f182ce78e9e0aa383afd27c7 /main
parent9c4821f4683232103e9882a73cbe48da52ede002 (diff)
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
Diffstat (limited to 'main')
-rw-r--r--main/cel.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/main/cel.c b/main/cel.c
index 2c46e5f55..534faed50 100644
--- a/main/cel.c
+++ b/main/cel.c
@@ -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);
}