[asterisk-commits] eliel: branch eliel/data_retrieval r186292 - in /team/eliel/data_retrieval: i...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 3 10:00:30 CDT 2009


Author: eliel
Date: Fri Apr  3 10:00:26 2009
New Revision: 186292

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=186292
Log:
Make the code be 90 columns long to conform to the current CODING-GUIDELINES.

Modified:
    team/eliel/data_retrieval/include/asterisk/data.h
    team/eliel/data_retrieval/main/data.c

Modified: team/eliel/data_retrieval/include/asterisk/data.h
URL: http://svn.digium.com/svn-view/asterisk/team/eliel/data_retrieval/include/asterisk/data.h?view=diff&rev=186292&r1=186291&r2=186292
==============================================================================
--- team/eliel/data_retrieval/include/asterisk/data.h (original)
+++ team/eliel/data_retrieval/include/asterisk/data.h Fri Apr  3 10:00:26 2009
@@ -132,7 +132,8 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-int ast_data_insert_str(struct ast_data_node *handler, const char *path, const char *value);
+int ast_data_insert_str(struct ast_data_node *handler, const char *path,
+	const char *value);
 
 /*!
  * \brief Insert a node named 'path' with the unsigned integer value 'value'.
@@ -143,7 +144,8 @@
  * \retval 0 on success.
  * \retval -1 on error.
  */
-int ast_data_insert_uint(struct ast_data_node *handler, const char *path, unsigned int value);
+int ast_data_insert_uint(struct ast_data_node *handler, const char *path,
+	unsigned int value);
 
 /*!
  * \brief Insert a node named 'path' with the boolean value 'value'.

Modified: team/eliel/data_retrieval/main/data.c
URL: http://svn.digium.com/svn-view/asterisk/team/eliel/data_retrieval/main/data.c?view=diff&rev=186292&r1=186291&r2=186292
==============================================================================
--- team/eliel/data_retrieval/main/data.c (original)
+++ team/eliel/data_retrieval/main/data.c Fri Apr  3 10:00:26 2009
@@ -157,7 +157,8 @@
 	strcpy(node->name, name);
 
 	/* initialize the childrens container. */
-	if (!(node->children = ao2_container_alloc(NUM_DATA_NODE_BUCKETS, data_node_hash, data_node_cmp))) {
+	if (!(node->children = ao2_container_alloc(NUM_DATA_NODE_BUCKETS,
+			data_node_hash, data_node_cmp))) {
 		ao2_ref(node, -1);
 		return NULL;
 	}
@@ -173,7 +174,8 @@
  * \retval NULL on error.
  * \retval A newly allocated child in parent.
  */
-static struct data_node *data_node_add_child(struct ao2_container *parent, const char *name)
+static struct data_node *data_node_add_child(struct ao2_container *parent,
+	const char *name)
 {
 	struct data_node *child;
 
@@ -305,7 +307,8 @@
  * \retval A node with the generated xml result.
  * \see root_data
  */
-static struct ast_xml_node *data_xml_node_retrieve(struct data_node *parent, const char *parent_node_name)
+static struct ast_xml_node *data_xml_node_retrieve(struct data_node *parent,
+	const char *parent_node_name)
 {
 	struct ast_xml_node *generated, *node;
 	struct ao2_iterator i;
@@ -410,7 +413,8 @@
  * \retval NULL on error.
  * \retval A pointer to the last allocated node.
  */
-static struct ast_xml_node *data_xml_node_create(struct ast_data_node *root, const char *path)
+static struct ast_xml_node *data_xml_node_create(struct ast_data_node *root,
+		const char *path)
 {
 	struct ast_xml_node *node, *child, *root_node = (struct ast_xml_node *) root;
 	char *rpath, *node_name;
@@ -476,7 +480,8 @@
 	}
 
 	if (ao2_container_count(node->children) || node->read) {
-		ast_log(LOG_ERROR, "The node '%s' was already registered. We were unable to register %s.\n", node->name, path);
+		ast_log(LOG_ERROR, "The node '%s' was already registered. \
+				We were unable to register %s.\n", node->name, path);
 		ao2_ref(node, -1);
 		data_unlock();
 		return -1;
@@ -547,6 +552,8 @@
 
 	attr = ast_xml_get_attribute(node, "type");
 	if (!attr) {
+		/* if this node, does not have a type attribute, it is because
+		 * this node is a container. */
 		return AST_DATA_TYPE_CONTAINER;
 	}
 	if (!strcmp(attr, DATA_TYPE_STRING)) {
@@ -715,7 +722,8 @@
 
 	ast_rwlock_init(&root_data_lock);
 
-	if (!(root_data = ao2_container_alloc(NUM_DATA_NODE_BUCKETS, data_node_hash, data_node_cmp))) {
+	if (!(root_data = ao2_container_alloc(NUM_DATA_NODE_BUCKETS,
+		data_node_hash, data_node_cmp))) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list