* \ingroup cdr_drivers
*/
+/*! \li \ref cdr_syslog.c uses the configuration file \ref cdr_syslog.conf
+ * \addtogroup configuration_file Configuration Files
+ */
+
+/*!
+ * \page cdr_syslog.conf cdr_syslog.conf
+ * \verbinclude cdr_syslog.conf.sample
+ */
+
/*** MODULEINFO
<depend>syslog</depend>
<support_level>core</support_level>
static const char name[] = "cdr-syslog";
-struct cdr_config {
+struct cdr_syslog_config {
AST_DECLARE_STRING_FIELDS(
AST_STRING_FIELD(ident);
AST_STRING_FIELD(format);
int facility;
int priority;
ast_mutex_t lock;
- AST_LIST_ENTRY(cdr_config) list;
+ AST_LIST_ENTRY(cdr_syslog_config) list;
};
-static AST_RWLIST_HEAD_STATIC(sinks, cdr_config);
+static AST_RWLIST_HEAD_STATIC(sinks, cdr_syslog_config);
static void free_config(void)
{
- struct cdr_config *sink;
+ struct cdr_syslog_config *sink;
while ((sink = AST_RWLIST_REMOVE_HEAD(&sinks, list))) {
ast_mutex_destroy(&sink->lock);
ast_free(sink);
{
struct ast_channel *dummy;
struct ast_str *str;
- struct cdr_config *sink;
+ struct cdr_syslog_config *sink;
/* Batching saves memory management here. Otherwise, it's the same as doing an
allocation and free each time. */
}
while ((catg = ast_category_browse(cfg, catg))) {
- struct cdr_config *sink;
+ struct cdr_syslog_config *sink;
if (!strcasecmp(catg, "general")) {
continue;
continue;
}
- sink = ast_calloc_with_stringfields(1, struct cdr_config, 1024);
+ sink = ast_calloc_with_stringfields(1, struct cdr_syslog_config, 1024);
if (!sink) {
ast_log(AST_LOG_ERROR,
static int unload_module(void)
{
- ast_cdr_unregister(name);
+ if (ast_cdr_unregister(name)) {
+ return -1;
+ }
if (AST_RWLIST_WRLOCK(&sinks)) {
ast_cdr_register(name, ast_module_info->description, syslog_log);