[asterisk-commits] cdr.h: Fix doxygen comments. (asterisk[15])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 9 19:08:10 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6696 )

Change subject: cdr.h: Fix doxygen comments.
......................................................................

cdr.h: Fix doxygen comments.

* Also some misc formatting in cdr.c.

Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a
---
M include/asterisk/cdr.h
M main/cdr.c
2 files changed, 33 insertions(+), 29 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Joshua Colp: Approved for Submit



diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h
index f752f7f..e10da82 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 @@
  * 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 @@
 
 /*! \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 @@
 	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 1817e80..9b04268 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -220,7 +220,7 @@
 
 /*! \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 */
@@ -1458,7 +1458,8 @@
 
 /* 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);
 }
@@ -2023,6 +2024,7 @@
 	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)) {
@@ -2040,6 +2042,7 @@
 	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;
@@ -2912,7 +2915,7 @@
 	}
 }
 
-/*
+/*!
  * \internal
  * \brief Callback that finds all CDRs that reference a particular channel by name
  */
@@ -2928,7 +2931,7 @@
 	return 0;
 }
 
-/*
+/*!
  * \internal
  * \brief Callback that finds a CDR by channel name
  */
@@ -3165,8 +3168,9 @@
 
 	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))) {
@@ -3249,6 +3253,7 @@
 	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;
@@ -3830,6 +3835,7 @@
 	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;
 		}
@@ -4320,5 +4326,3 @@
 
 	return cdr_toggle_runtime_options();
 }
-
-

-- 
To view, visit https://gerrit.asterisk.org/6696
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a
Gerrit-Change-Number: 6696
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171009/1d0c49eb/attachment-0001.html>


More information about the asterisk-commits mailing list