[asterisk-commits] eliel: branch group/data_api_gsoc2009 r208016 - in /team/group/data_api_gsoc2...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 22 06:57:05 CDT 2009


Author: eliel
Date: Wed Jul 22 06:50:19 2009
New Revision: 208016

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=208016
Log:
- Remove trailing white spaces.
- Format the code to 90 columns max.

Modified:
    team/group/data_api_gsoc2009/apps/app_queue.c
    team/group/data_api_gsoc2009/include/asterisk/data.h
    team/group/data_api_gsoc2009/include/asterisk/xml.h
    team/group/data_api_gsoc2009/main/data.c

Modified: team/group/data_api_gsoc2009/apps/app_queue.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/apps/app_queue.c?view=diff&rev=208016&r1=208015&r2=208016
==============================================================================
--- team/group/data_api_gsoc2009/apps/app_queue.c (original)
+++ team/group/data_api_gsoc2009/apps/app_queue.c Wed Jul 22 06:50:19 2009
@@ -6378,8 +6378,9 @@
 		sl = 0;
 		callscompleted = ast_data_retrieve_int(queue, "callscompleted");
 		if (callscompleted) {
-			sl = 100 * ((float) ast_data_retrieve_int(queue, "callscompletedinsl")
-				/ (float) callscompleted); 
+			sl = 100 * ((float) ast_data_retrieve_int(queue,
+				"callscompletedinsl")
+				/ (float) callscompleted);
 		}
 		ast_str_append(&out, 0, ") in '%s' strategy (%ds holdtime, %ds talktime),"
 			" W:%d, C:%d, A:%d, SL:%2.1f%% within %ds",
@@ -6403,8 +6404,9 @@
 					do_print(s, fd, "   Members: ");
 				}
 				has_members++;
-				membername = ast_data_retrieve_string(member, "membername");
-				ast_str_set(&out, 0, "      %s", membername); 
+				membername = ast_data_retrieve_string(member,
+					"membername");
+				ast_str_set(&out, 0, "      %s", membername);
 				interface = ast_data_retrieve_string(member, "interface");
 
 				if (strcasecmp(membername, interface)) {
@@ -6417,10 +6419,10 @@
 				}
 
 				ast_str_append(&out, 0, "%s%s%s (%s)",
-						ast_data_retrieve_int(member, "dynamic") ? " (dynamic)" : "",
-						ast_data_retrieve_int(member, "realtime") ? " (realtime)" : "",
-						ast_data_retrieve_int(member, "paused") ? " (paused)" : "",
-						ast_devstate2str(ast_data_retrieve_int(member, "status")));
+					ast_data_retrieve_int(member, "dynamic") ? " (dynamic)" : "",
+					ast_data_retrieve_int(member, "realtime") ? " (realtime)" : "",
+					ast_data_retrieve_int(member, "paused") ? " (paused)" : "",
+					ast_devstate2str(ast_data_retrieve_int(member, "status")));
 				calls = ast_data_retrieve_int(member, "calls");
 
 				if (calls) {
@@ -6444,11 +6446,11 @@
 			do_print(s, fd, "   Callers: ");
 			while ((caller = ast_data_iterator_next(ic))) {
 				ast_str_set(&out, 0, "      %d. %s (wait: %ld:%2.2ld, prio: %d)",
-						ast_data_retrieve_int(caller, "pos"),
-						ast_data_retrieve_string(caller, "channel/name"),
-						(long) (now - ast_data_retrieve_int(caller, "start")) / 60,
-						(long) (now - ast_data_retrieve_int(caller, "start")) % 60,
-						ast_data_retrieve_int(caller, "prio"));
+					ast_data_retrieve_int(caller, "pos"),
+					ast_data_retrieve_string(caller, "channel/name"),
+					(long) (now - ast_data_retrieve_int(caller, "start")) / 60,
+					(long) (now - ast_data_retrieve_int(caller, "start")) % 60,
+					ast_data_retrieve_int(caller, "prio"));
 				do_print(s, fd, ast_str_buffer(out));
 			}
 			ast_data_iterator_end(ic);

Modified: team/group/data_api_gsoc2009/include/asterisk/data.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/include/asterisk/data.h?view=diff&rev=208016&r1=208015&r2=208016
==============================================================================
--- team/group/data_api_gsoc2009/include/asterisk/data.h (original)
+++ team/group/data_api_gsoc2009/include/asterisk/data.h Wed Jul 22 06:50:19 2009
@@ -571,13 +571,13 @@
  * \retval 0 on success.
  * \retval <0 on error.
  */
-int ast_data_retrieve(struct ast_data *tree, const char *path, struct ast_data_retrieve *content); 
+int ast_data_retrieve(struct ast_data *tree, const char *path, struct ast_data_retrieve *content);
 
 /*!
  * \brief Retrieve the integer value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline int ast_data_retrieve_int(struct ast_data *tree, const char *path)
 {
@@ -592,7 +592,7 @@
  * \brief Retrieve the boolean value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline unsigned int ast_data_retrieve_bool(struct ast_data *tree, const char *path)
 {
@@ -607,7 +607,7 @@
  * \brief Retrieve the unsigned integer value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline unsigned int ast_data_retrieve_uint(struct ast_data *tree, const char *path)
 {
@@ -622,7 +622,7 @@
  * \brief Retrieve the string value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline const char *ast_data_retrieve_string(struct ast_data *tree, const char *path)
 {
@@ -637,7 +637,7 @@
  * \brief Retrieve the ptr value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline void *ast_data_retrieve_ptr(struct ast_data *tree, const char *path)
 {
@@ -652,7 +652,7 @@
  * \brief Retrieve the double value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline double ast_data_retrieve_dbl(struct ast_data *tree, const char *path)
 {
@@ -667,7 +667,7 @@
  * \brief Retrieve the ipv4 address value of a node.
  * \param[in] tree The tree from where to get the value.
  * \param[in] path The node name or path.
- * \returns The value of the node. 
+ * \returns The value of the node.
  */
 static inline struct in_addr ast_data_retrieve_ipaddr(struct ast_data *tree, const char *path)
 {

Modified: team/group/data_api_gsoc2009/include/asterisk/xml.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/include/asterisk/xml.h?view=diff&rev=208016&r1=208015&r2=208016
==============================================================================
--- team/group/data_api_gsoc2009/include/asterisk/xml.h (original)
+++ team/group/data_api_gsoc2009/include/asterisk/xml.h Wed Jul 22 06:50:19 2009
@@ -40,7 +40,7 @@
  */
 int ast_xml_finish(void);
 
-/*! 
+/*!
  * \brief Open an XML document.
  * \param filename Document path.
  * \retval NULL on error.

Modified: team/group/data_api_gsoc2009/main/data.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/data_api_gsoc2009/main/data.c?view=diff&rev=208016&r1=208015&r2=208016
==============================================================================
--- team/group/data_api_gsoc2009/main/data.c (original)
+++ team/group/data_api_gsoc2009/main/data.c Wed Jul 22 06:50:19 2009
@@ -872,7 +872,8 @@
 		return NULL;
 	}
 
-	for (elements = strtok_r(search_string_dup, ",", &saveptr); elements; elements = strtok_r(NULL, ",", &saveptr)) {
+	for (elements = strtok_r(search_string_dup, ",", &saveptr); elements;
+		elements = strtok_r(NULL, ",", &saveptr)) {
 		/* Parse the name */
 		ast_str_reset(name);
 		for (i = 0; !data_search_comparison_char(elements[i]) &&
@@ -902,7 +903,8 @@
 
 		cmp_type = data_search_comparison_type(ast_str_buffer(comparison));
 		if (cmp_type == DATA_CMP_UNKNOWN) {
-			ast_log(LOG_ERROR, "Invalid comparison '%s'\n", ast_str_buffer(comparison));
+			ast_log(LOG_ERROR, "Invalid comparison '%s'\n",
+				ast_str_buffer(comparison));
 			continue;
 		}
 
@@ -942,7 +944,8 @@
  * \retval 1 If the comparison doesn't match.
  * \retval 0 If the comparison matches.
  */
-static inline int data_search_comparison_result(int cmpval, enum data_search_comparison comparison_type)
+static inline int data_search_comparison_result(int cmpval,
+	enum data_search_comparison comparison_type)
 {
 	switch (comparison_type) {
 	case DATA_CMP_GE:
@@ -1013,7 +1016,8 @@
 	return data_search_get_node(child, savepath);
 }
 
-int ast_data_search_cmp_string(const struct ast_data_search *root, const char *name, char *value)
+int ast_data_search_cmp_string(const struct ast_data_search *root, const char *name,
+	char *value)
 {
 	struct ast_data_search *child;
 	enum data_search_comparison cmp_type;
@@ -1176,7 +1180,8 @@
 	return -1;
 }
 
-int ast_data_search_has_condition(const struct ast_data_search *search, const char *compare_condition)
+int ast_data_search_has_condition(const struct ast_data_search *search,
+	const char *compare_condition)
 {
 	struct ast_data_search *child;
 
@@ -1220,31 +1225,38 @@
 		notmatch = 0;
 		switch (mapping[member].type) {
 			case AST_DATA_STRING:
-				notmatch = ast_data_search_cmp_string(struct_children, node->name,
+				notmatch = ast_data_search_cmp_string(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_STRING(structure));
 				break;
 			case AST_DATA_INTEGER:
-				notmatch = ast_data_search_cmp_int(struct_children, node->name,
+				notmatch = ast_data_search_cmp_int(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_INTEGER(structure));
 				break;
 			case AST_DATA_BOOLEAN:
-				notmatch = ast_data_search_cmp_bool(struct_children, node->name,
+				notmatch = ast_data_search_cmp_bool(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_BOOLEAN(structure));
 				break;
 			case AST_DATA_UNSIGNED_INTEGER:
-				notmatch = ast_data_search_cmp_uint(struct_children, node->name,
+				notmatch = ast_data_search_cmp_uint(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_UNSIGNED_INTEGER(structure));
 				break;
 			case AST_DATA_DOUBLE:
-				notmatch = ast_data_search_cmp_dbl(struct_children, node->name,
+				notmatch = ast_data_search_cmp_dbl(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_DOUBLE(structure));
 				break;
 			case AST_DATA_IPADDR:
-				notmatch = ast_data_search_cmp_ipaddr(struct_children, node->name,
+				notmatch = ast_data_search_cmp_ipaddr(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_IPADDR(structure));
 				break;
 			case AST_DATA_POINTER:
-				notmatch = ast_data_search_cmp_ptr(struct_children, node->name,
+				notmatch = ast_data_search_cmp_ptr(struct_children,
+					node->name,
 					mapping[member].get.AST_DATA_POINTER(structure));
 				break;
 			case AST_DATA_CONTAINER:




More information about the asterisk-commits mailing list