[asterisk-commits] mjordan: branch mjordan/manager-events r368693 - in /team/mjordan/manager-eve...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 8 08:31:29 CDT 2012


Author: mjordan
Date: Fri Jun  8 08:31:23 2012
New Revision: 368693

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368693
Log:
Addressed mmichelson's findings

Modified:
    team/mjordan/manager-events/build_tools/make_version
    team/mjordan/manager-events/include/asterisk/xmldoc.h
    team/mjordan/manager-events/main/manager.c
    team/mjordan/manager-events/main/xmldoc.c

Modified: team/mjordan/manager-events/build_tools/make_version
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/build_tools/make_version?view=diff&rev=368693&r1=368692&r2=368693
==============================================================================
--- team/mjordan/manager-events/build_tools/make_version (original)
+++ team/mjordan/manager-events/build_tools/make_version Fri Jun  8 08:31:23 2012
@@ -7,7 +7,6 @@
     BRANCH=0
     TEAM=0
     TAG=0
-    FEATURE=0
 
     REV=`svnversion -c ${1} | cut -d: -f2`
 
@@ -41,9 +40,6 @@
             else
                 RESULT="${RESULT}-${PART}"
             fi
-            if [ ${FEATURE} != 0 ] ; then
-                RESULT="${RESULT}-${FEATURE_NAME}"
-            fi
             break
         fi
 
@@ -53,12 +49,6 @@
             else
                 RESULT="${RESULT}-${PART}"
             fi
-            continue
-        fi
-
-        if [ "${PART}" = "certified" ] ; then
-            FEATURE=1
-            FEATURE_NAME="cert"
             continue
         fi
 

Modified: team/mjordan/manager-events/include/asterisk/xmldoc.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/include/asterisk/xmldoc.h?view=diff&rev=368693&r1=368692&r2=368693
==============================================================================
--- team/mjordan/manager-events/include/asterisk/xmldoc.h (original)
+++ team/mjordan/manager-events/include/asterisk/xmldoc.h Fri Jun  8 08:31:23 2012
@@ -46,23 +46,23 @@
  * \since 11
  */
 struct ast_xml_doc_item {
-	/*!< The syntax of the item */
+	/*! The syntax of the item */
 	struct ast_str *syntax;
-	/*!< Seealso tagged information, if it exists */
+	/*! Seealso tagged information, if it exists */
 	struct ast_str *seealso;
-	/*!< The arguments to the item */
+	/*! The arguments to the item */
 	struct ast_str *arguments;
-	/*!< A synopsis of the item */
+	/*! A synopsis of the item */
 	struct ast_str *synopsis;
-	/*!< A description of the item */
+	/*! A description of the item */
 	struct ast_str *description;
 	AST_DECLARE_STRING_FIELDS(
-		/*!< The name of the item */
+		/*! The name of the item */
 		AST_STRING_FIELD(name);
-		/*!< The type of the item */
+		/*! The type of the item */
 		AST_STRING_FIELD(type);
 	);
-	/*!< The next XML documentation item that matches the same name/item type */
+	/*! The next XML documentation item that matches the same name/item type */
 	struct ast_xml_doc_item *next;
 };
 

Modified: team/mjordan/manager-events/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/main/manager.c?view=diff&rev=368693&r1=368692&r2=368693
==============================================================================
--- team/mjordan/manager-events/main/manager.c (original)
+++ team/mjordan/manager-events/main/manager.c Fri Jun  8 08:31:23 2012
@@ -6830,6 +6830,7 @@
 
 	while ((item = ao2_iterator_next(it_events))) {
 		items[totalitems++] = item;
+		ao2_ref(item, -1);
 	}
 
 	qsort(items, totalitems, sizeof(struct ast_xml_doc_item *), ast_xml_doc_item_cmp_fn);
@@ -6895,27 +6896,27 @@
 
 	ast_cli(a->fd, "Event: %s\n", a->argv[3]);
 	for (temp = item; temp; temp = temp->next) {
-		if (ast_str_strlen(temp->synopsis) && strcmp("(null)", ast_str_buffer(temp->synopsis))) {
+		if (!ast_strlen_zero(ast_str_buffer(temp->synopsis))) {
 			ast_cli(a->fd, "%s%s\n\n",
 				synopsis_title,
 				ast_xmldoc_printable(ast_str_buffer(temp->synopsis), 1));
 		}
-		if (ast_str_strlen(temp->syntax) && strcmp("(null)", ast_str_buffer(temp->syntax))) {
+		if (!ast_strlen_zero(ast_str_buffer(temp->syntax))) {
 			ast_cli(a->fd, "%s%s\n\n",
 				syntax_title,
 				ast_xmldoc_printable(ast_str_buffer(temp->syntax), 1));
 		}
-		if (ast_str_strlen(temp->description) && strcmp("(null)", ast_str_buffer(temp->description))) {
+		if (!ast_strlen_zero(ast_str_buffer(temp->description))) {
 			ast_cli(a->fd, "%s%s\n\n",
 				description_title,
 				ast_xmldoc_printable(ast_str_buffer(temp->description), 1));
 		}
-		if (ast_str_strlen(temp->arguments) && strcmp("(null)", ast_str_buffer(temp->arguments))) {
+		if (!ast_strlen_zero(ast_str_buffer(temp->arguments))) {
 			ast_cli(a->fd, "%s%s\n\n",
 				arguments_title,
 				ast_xmldoc_printable(ast_str_buffer(temp->arguments), 1));
 		}
-		if (ast_str_strlen(temp->seealso) && strcmp("(null)", ast_str_buffer(temp->seealso))) {
+		if (!ast_strlen_zero(ast_str_buffer(temp->seealso))) {
 			ast_cli(a->fd, "%s%s\n\n",
 				seealso_title,
 				ast_xmldoc_printable(ast_str_buffer(temp->seealso), 1));

Modified: team/mjordan/manager-events/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/manager-events/main/xmldoc.c?view=diff&rev=368693&r1=368692&r2=368693
==============================================================================
--- team/mjordan/manager-events/main/xmldoc.c (original)
+++ team/mjordan/manager-events/main/xmldoc.c Fri Jun  8 08:31:23 2012
@@ -2111,11 +2111,21 @@
 	synopsis = _ast_xmldoc_build_synopsis(node);
 	description = _ast_xmldoc_build_description(node);
 
-	ast_str_set(&item->syntax, 0, "%s", syntax);
-	ast_str_set(&item->seealso, 0, "%s", seealso);
-	ast_str_set(&item->arguments, 0, "%s", arguments);
-	ast_str_set(&item->synopsis, 0, "%s", synopsis);
-	ast_str_set(&item->description, 0, "%s", description);
+	if (syntax) {
+		ast_str_set(&item->syntax, 0, "%s", syntax);
+	}
+	if (seealso) {
+		ast_str_set(&item->seealso, 0, "%s", seealso);
+	}
+	if (arguments) {
+		ast_str_set(&item->arguments, 0, "%s", arguments);
+	}
+	if (synopsis) {
+		ast_str_set(&item->synopsis, 0, "%s", synopsis);
+	}
+	if (description) {
+		ast_str_set(&item->description, 0, "%s", description);
+	}
 
 	ast_free(syntax);
 	ast_free(seealso);




More information about the asterisk-commits mailing list