<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6696">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Joshua Colp: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cdr.h: Fix doxygen comments.<br><br>* Also some misc formatting in cdr.c.<br><br>Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a<br>---<br>M include/asterisk/cdr.h<br>M main/cdr.c<br>2 files changed, 33 insertions(+), 29 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h<br>index f752f7f..e10da82 100644<br>--- a/include/asterisk/cdr.h<br>+++ b/include/asterisk/cdr.h<br>@@ -217,19 +217,19 @@<br> <br> /*! \brief CDR engine settings */<br> enum ast_cdr_settings {<br>- CDR_ENABLED = 1 << 0, /*< Enable CDRs */<br>- CDR_BATCHMODE = 1 << 1, /*< Whether or not we should dispatch CDRs in batches */<br>- CDR_UNANSWERED = 1 << 2, /*< Log unanswered CDRs */<br>- CDR_CONGESTION = 1 << 3, /*< Treat congestion as if it were a failed call */<br>- CDR_END_BEFORE_H_EXTEN = 1 << 4, /*< End the CDR before the 'h' extension runs */<br>- CDR_INITIATED_SECONDS = 1 << 5, /*< Include microseconds into the billing time */<br>- CDR_DEBUG = 1 << 6, /*< Enables extra debug statements */<br>+ CDR_ENABLED = 1 << 0, /*!< Enable CDRs */<br>+ CDR_BATCHMODE = 1 << 1, /*!< Whether or not we should dispatch CDRs in batches */<br>+ CDR_UNANSWERED = 1 << 2, /*!< Log unanswered CDRs */<br>+ CDR_CONGESTION = 1 << 3, /*!< Treat congestion as if it were a failed call */<br>+ CDR_END_BEFORE_H_EXTEN = 1 << 4, /*!< End the CDR before the 'h' extension runs */<br>+ CDR_INITIATED_SECONDS = 1 << 5, /*!< Include microseconds into the billing time */<br>+ CDR_DEBUG = 1 << 6, /*!< Enables extra debug statements */<br> };<br> <br> /*! \brief CDR Batch Mode settings */<br> enum ast_cdr_batch_mode_settings {<br>- BATCH_MODE_SCHEDULER_ONLY = 1 << 0, /*< Don't spawn a thread to handle the batches - do it on the scheduler */<br>- BATCH_MODE_SAFE_SHUTDOWN = 1 << 1, /*< During safe shutdown, submit the batched CDRs */<br>+ BATCH_MODE_SCHEDULER_ONLY = 1 << 0, /*!< Don't spawn a thread to handle the batches - do it on the scheduler */<br>+ BATCH_MODE_SAFE_SHUTDOWN = 1 << 1, /*!< During safe shutdown, submit the batched CDRs */<br> };<br> <br> /*!<br>@@ -237,14 +237,14 @@<br> * state of a CDR object based on these flags.<br> */<br> enum ast_cdr_options {<br>- AST_CDR_FLAG_KEEP_VARS = (1 << 0), /*< Copy variables during the operation */<br>- AST_CDR_FLAG_DISABLE = (1 << 1), /*< Disable the current CDR */<br>- AST_CDR_FLAG_DISABLE_ALL = (3 << 1), /*< Disable the CDR and all future CDRs */<br>- AST_CDR_FLAG_PARTY_A = (1 << 3), /*< Set the channel as party A */<br>- AST_CDR_FLAG_FINALIZE = (1 << 4), /*< Finalize the current CDRs */<br>- AST_CDR_FLAG_SET_ANSWER = (1 << 5), /*< If the channel is answered, set the answer time to now */<br>- AST_CDR_FLAG_RESET = (1 << 6), /*< If set, set the start and answer time to now */<br>- AST_CDR_LOCK_APP = (1 << 7), /*< Prevent any further changes to the application field/data field for this CDR */<br>+ AST_CDR_FLAG_KEEP_VARS = (1 << 0), /*!< Copy variables during the operation */<br>+ AST_CDR_FLAG_DISABLE = (1 << 1), /*!< Disable the current CDR */<br>+ AST_CDR_FLAG_DISABLE_ALL = (3 << 1), /*!< Disable the CDR and all future CDRs */<br>+ AST_CDR_FLAG_PARTY_A = (1 << 3), /*!< Set the channel as party A */<br>+ AST_CDR_FLAG_FINALIZE = (1 << 4), /*!< Finalize the current CDRs */<br>+ AST_CDR_FLAG_SET_ANSWER = (1 << 5), /*!< If the channel is answered, set the answer time to now */<br>+ AST_CDR_FLAG_RESET = (1 << 6), /*!< If set, set the start and answer time to now */<br>+ AST_CDR_LOCK_APP = (1 << 7), /*!< Prevent any further changes to the application field/data field for this CDR */<br> };<br> <br> /*!<br>@@ -262,11 +262,11 @@<br> <br> /*! \brief The global options available for CDRs */<br> struct ast_cdr_config {<br>- struct ast_flags settings; /*< CDR settings */<br>+ struct ast_flags settings; /*!< CDR settings */<br> struct batch_settings {<br>- unsigned int time; /*< Time between batches */<br>- unsigned int size; /*< Size to trigger a batch */<br>- struct ast_flags settings; /*< Settings for batches */<br>+ unsigned int time; /*!< Time between batches */<br>+ unsigned int size; /*!< Size to trigger a batch */<br>+ struct ast_flags settings; /*!< Settings for batches */<br> } batch_settings;<br> };<br> <br>@@ -312,7 +312,7 @@<br> unsigned int flags;<br> /*! Unique Channel Identifier */<br> char uniqueid[AST_MAX_UNIQUEID];<br>- /* Linked group Identifier */<br>+ /*! Linked group Identifier */<br> char linkedid[AST_MAX_UNIQUEID];<br> /*! User field */<br> char userfield[AST_MAX_USER_FIELD];<br>diff --git a/main/cdr.c b/main/cdr.c<br>index 1817e80..9b04268 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -220,7 +220,7 @@<br> <br> /*! \brief The configuration settings for this module */<br> struct module_config {<br>- struct ast_cdr_config *general; /*< CDR global settings */<br>+ struct ast_cdr_config *general; /*!< CDR global settings */<br> };<br> <br> /*! \brief The container for the module configuration */<br>@@ -1458,7 +1458,8 @@<br> <br> /* SINGLE STATE */<br> <br>-static void single_state_init_function(struct cdr_object *cdr) {<br>+static void single_state_init_function(struct cdr_object *cdr)<br>+{<br> cdr->start = ast_tvnow();<br> cdr_object_check_party_a_answer(cdr);<br> }<br>@@ -2023,6 +2024,7 @@<br> struct cdr_object *cdr = obj;<br> struct ast_channel_snapshot *party_b = arg;<br> struct cdr_object *it_cdr;<br>+<br> for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {<br> if (it_cdr->party_b.snapshot<br> && !strcasecmp(it_cdr->party_b.snapshot->name, party_b->name)) {<br>@@ -2040,6 +2042,7 @@<br> struct cdr_object *cdr = obj;<br> struct ast_channel_snapshot *party_b = arg;<br> struct cdr_object *it_cdr;<br>+<br> for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {<br> if (!it_cdr->fn_table->process_party_b) {<br> continue;<br>@@ -2912,7 +2915,7 @@<br> }<br> }<br> <br>-/*<br>+/*!<br> * \internal<br> * \brief Callback that finds all CDRs that reference a particular channel by name<br> */<br>@@ -2928,7 +2931,7 @@<br> return 0;<br> }<br> <br>-/*<br>+/*!<br> * \internal<br> * \brief Callback that finds a CDR by channel name<br> */<br>@@ -3165,8 +3168,9 @@<br> <br> ao2_lock(cdr);<br> for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {<br>- if (++x > 1)<br>+ if (++x > 1) {<br> ast_str_append(buf, 0, "\n");<br>+ }<br> <br> AST_LIST_TRAVERSE(&it_cdr->party_a.variables, variable, entries) {<br> if (!(var = ast_var_name(variable))) {<br>@@ -3249,6 +3253,7 @@<br> struct cdr_object *cdr = obj;<br> struct party_b_userfield_update *info = arg;<br> struct cdr_object *it_cdr;<br>+<br> for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {<br> if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) {<br> continue;<br>@@ -3830,6 +3835,7 @@<br> ao2_lock(cdr);<br> for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {<br> struct timeval end;<br>+<br> if (snapshot_is_dialed(it_cdr->party_a.snapshot)) {<br> continue;<br> }<br>@@ -4320,5 +4326,3 @@<br> <br> return cdr_toggle_runtime_options();<br> }<br>-<br>-<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6696">change 6696</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6696"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a </div>
<div style="display:none"> Gerrit-Change-Number: 6696 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>