summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-10-09 19:52:06 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-10-09 19:52:06 -0500
commit9bb9b2f53f58bac02cdd8dbbd2ed0e42cda456e0 (patch)
tree75f545ba058ab01510ebb4c606679f46b21d348f
parentd5b2f4c3463c459934e7f73ec7a0a79b7502d5b5 (diff)
parentf9f9a5412fe10409c992ad578362e4a2520d8a77 (diff)
Merge "cdr.h: Fix doxygen comments." into 14
-rw-r--r--include/asterisk/cdr.h44
-rw-r--r--main/cdr.c18
2 files changed, 33 insertions, 29 deletions
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h
index f752f7f9f..e10da8223 100644
--- a/include/asterisk/cdr.h
+++ b/include/asterisk/cdr.h
@@ -217,19 +217,19 @@
/*! \brief CDR engine settings */
enum ast_cdr_settings {
- CDR_ENABLED = 1 << 0, /*< Enable CDRs */
- CDR_BATCHMODE = 1 << 1, /*< Whether or not we should dispatch CDRs in batches */
- CDR_UNANSWERED = 1 << 2, /*< Log unanswered CDRs */
- CDR_CONGESTION = 1 << 3, /*< Treat congestion as if it were a failed call */
- CDR_END_BEFORE_H_EXTEN = 1 << 4, /*< End the CDR before the 'h' extension runs */
- CDR_INITIATED_SECONDS = 1 << 5, /*< Include microseconds into the billing time */
- CDR_DEBUG = 1 << 6, /*< Enables extra debug statements */
+ CDR_ENABLED = 1 << 0, /*!< Enable CDRs */
+ CDR_BATCHMODE = 1 << 1, /*!< Whether or not we should dispatch CDRs in batches */
+ CDR_UNANSWERED = 1 << 2, /*!< Log unanswered CDRs */
+ CDR_CONGESTION = 1 << 3, /*!< Treat congestion as if it were a failed call */
+ CDR_END_BEFORE_H_EXTEN = 1 << 4, /*!< End the CDR before the 'h' extension runs */
+ CDR_INITIATED_SECONDS = 1 << 5, /*!< Include microseconds into the billing time */
+ CDR_DEBUG = 1 << 6, /*!< Enables extra debug statements */
};
/*! \brief CDR Batch Mode settings */
enum ast_cdr_batch_mode_settings {
- BATCH_MODE_SCHEDULER_ONLY = 1 << 0, /*< Don't spawn a thread to handle the batches - do it on the scheduler */
- BATCH_MODE_SAFE_SHUTDOWN = 1 << 1, /*< During safe shutdown, submit the batched CDRs */
+ BATCH_MODE_SCHEDULER_ONLY = 1 << 0, /*!< Don't spawn a thread to handle the batches - do it on the scheduler */
+ BATCH_MODE_SAFE_SHUTDOWN = 1 << 1, /*!< During safe shutdown, submit the batched CDRs */
};
/*!
@@ -237,14 +237,14 @@ enum ast_cdr_batch_mode_settings {
* state of a CDR object based on these flags.
*/
enum ast_cdr_options {
- AST_CDR_FLAG_KEEP_VARS = (1 << 0), /*< Copy variables during the operation */
- AST_CDR_FLAG_DISABLE = (1 << 1), /*< Disable the current CDR */
- AST_CDR_FLAG_DISABLE_ALL = (3 << 1), /*< Disable the CDR and all future CDRs */
- AST_CDR_FLAG_PARTY_A = (1 << 3), /*< Set the channel as party A */
- AST_CDR_FLAG_FINALIZE = (1 << 4), /*< Finalize the current CDRs */
- AST_CDR_FLAG_SET_ANSWER = (1 << 5), /*< If the channel is answered, set the answer time to now */
- AST_CDR_FLAG_RESET = (1 << 6), /*< If set, set the start and answer time to now */
- AST_CDR_LOCK_APP = (1 << 7), /*< Prevent any further changes to the application field/data field for this CDR */
+ AST_CDR_FLAG_KEEP_VARS = (1 << 0), /*!< Copy variables during the operation */
+ AST_CDR_FLAG_DISABLE = (1 << 1), /*!< Disable the current CDR */
+ AST_CDR_FLAG_DISABLE_ALL = (3 << 1), /*!< Disable the CDR and all future CDRs */
+ AST_CDR_FLAG_PARTY_A = (1 << 3), /*!< Set the channel as party A */
+ AST_CDR_FLAG_FINALIZE = (1 << 4), /*!< Finalize the current CDRs */
+ AST_CDR_FLAG_SET_ANSWER = (1 << 5), /*!< If the channel is answered, set the answer time to now */
+ AST_CDR_FLAG_RESET = (1 << 6), /*!< If set, set the start and answer time to now */
+ AST_CDR_LOCK_APP = (1 << 7), /*!< Prevent any further changes to the application field/data field for this CDR */
};
/*!
@@ -262,11 +262,11 @@ enum ast_cdr_disposition {
/*! \brief The global options available for CDRs */
struct ast_cdr_config {
- struct ast_flags settings; /*< CDR settings */
+ struct ast_flags settings; /*!< CDR settings */
struct batch_settings {
- unsigned int time; /*< Time between batches */
- unsigned int size; /*< Size to trigger a batch */
- struct ast_flags settings; /*< Settings for batches */
+ unsigned int time; /*!< Time between batches */
+ unsigned int size; /*!< Size to trigger a batch */
+ struct ast_flags settings; /*!< Settings for batches */
} batch_settings;
};
@@ -312,7 +312,7 @@ struct ast_cdr {
unsigned int flags;
/*! Unique Channel Identifier */
char uniqueid[AST_MAX_UNIQUEID];
- /* Linked group Identifier */
+ /*! Linked group Identifier */
char linkedid[AST_MAX_UNIQUEID];
/*! User field */
char userfield[AST_MAX_USER_FIELD];
diff --git a/main/cdr.c b/main/cdr.c
index ff0e4760e..df5d99b9b 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -223,7 +223,7 @@ static int cdr_toggle_runtime_options(void);
/*! \brief The configuration settings for this module */
struct module_config {
- struct ast_cdr_config *general; /*< CDR global settings */
+ struct ast_cdr_config *general; /*!< CDR global settings */
};
/*! \brief The container for the module configuration */
@@ -1453,7 +1453,8 @@ static int base_process_parked_channel(struct cdr_object *cdr, struct ast_parked
/* SINGLE STATE */
-static void single_state_init_function(struct cdr_object *cdr) {
+static void single_state_init_function(struct cdr_object *cdr)
+{
cdr->start = ast_tvnow();
cdr_object_check_party_a_answer(cdr);
}
@@ -2015,6 +2016,7 @@ static int cdr_object_finalize_party_b(void *obj, void *arg, int flags)
struct cdr_object *cdr = obj;
struct ast_channel_snapshot *party_b = arg;
struct cdr_object *it_cdr;
+
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
if (it_cdr->party_b.snapshot
&& !strcasecmp(it_cdr->party_b.snapshot->name, party_b->name)) {
@@ -2032,6 +2034,7 @@ static int cdr_object_update_party_b(void *obj, void *arg, int flags)
struct cdr_object *cdr = obj;
struct ast_channel_snapshot *party_b = arg;
struct cdr_object *it_cdr;
+
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
if (!it_cdr->fn_table->process_party_b) {
continue;
@@ -2904,7 +2907,7 @@ void ast_cdr_format_var(struct ast_cdr *cdr, const char *name, char **ret, char
}
}
-/*
+/*!
* \internal
* \brief Callback that finds all CDRs that reference a particular channel by name
*/
@@ -2920,7 +2923,7 @@ static int cdr_object_select_all_by_name_cb(void *obj, void *arg, int flags)
return 0;
}
-/*
+/*!
* \internal
* \brief Callback that finds a CDR by channel name
*/
@@ -3157,8 +3160,9 @@ int ast_cdr_serialize_variables(const char *channel_name, struct ast_str **buf,
ao2_lock(cdr);
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
- if (++x > 1)
+ if (++x > 1) {
ast_str_append(buf, 0, "\n");
+ }
AST_LIST_TRAVERSE(&it_cdr->party_a.variables, variable, entries) {
if (!(var = ast_var_name(variable))) {
@@ -3241,6 +3245,7 @@ static int cdr_object_update_party_b_userfield_cb(void *obj, void *arg, int flag
struct cdr_object *cdr = obj;
struct party_b_userfield_update *info = arg;
struct cdr_object *it_cdr;
+
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) {
continue;
@@ -3822,6 +3827,7 @@ static void cli_show_channel(struct ast_cli_args *a)
ao2_lock(cdr);
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
struct timeval end;
+
if (snapshot_is_dialed(it_cdr->party_a.snapshot)) {
continue;
}
@@ -4312,5 +4318,3 @@ int ast_cdr_engine_reload(void)
return cdr_toggle_runtime_options();
}
-
-