[svn-commits] mvanbaak: branch group/appdocsxml r128289 - /team/group/appdocsxml/main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Jul 5 16:53:16 CDT 2008


Author: mvanbaak
Date: Sat Jul  5 16:53:16 2008
New Revision: 128289

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128289
Log:
whitespace fixes only

Modified:
    team/group/appdocsxml/main/pbx.c

Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=128289&r1=128288&r2=128289
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Sat Jul  5 16:53:16 2008
@@ -4334,7 +4334,7 @@
 	/* For now, I just throw away cdata */
 	xmldoc = fopen(FILE_XML_DOC, "r");
 
-	if(!xmldoc) {
+	if (!xmldoc) {
 		ast_log(LOG_ERROR, "Could not open XML Doc at '%s'", FILE_XML_DOC);
 		return 1;
 	}
@@ -4363,9 +4363,9 @@
 	node = desc = syn = NULL;
 
 	/* XXX If we do not have documentation, should we still register the application? */
-	if(!documentation_tree) {
-	    ast_log(LOG_WARNING, "Cannot get description or synopsis for application, loading XML documentation failed.\n");
-	    return -1;
+	if (!documentation_tree) {
+		ast_log(LOG_WARNING, "Cannot get description or synopsis for application, loading XML documentation failed.\n");
+		return -1;
 	}
 
 	AST_RWLIST_WRLOCK(&apps);
@@ -4385,28 +4385,26 @@
 		return -1;
 	}
 	
-	strapp = ast_strdup(app);	
+	strapp = ast_strdup(app);
 	node = mxmlFindElement(documentation_tree, documentation_tree, "application", "name", strapp, MXML_DESCEND);
 
-	if(!node) {
-	    ast_log(LOG_WARNING, "Cannot find application documentation for app: '%s'\n", app);
-	    return -1;
+	if (!node) {
+		ast_log(LOG_WARNING, "Cannot find application documentation for app: '%s'\n", app);
+		return -1;
 	}
 
 	syn = mxmlFindElement(node, documentation_tree, "synopsis", NULL, NULL, MXML_DESCEND);
 	desc = mxmlFindElement(node, documentation_tree, "description", NULL, NULL, MXML_DESCEND);
     
-	if(!syn || !desc || !syn->child || !desc->child) {
-
-	    ast_log(LOG_WARNING, "Cannot find Application description or synopsis for app: '%s'\n", app);
-	    return -1;
-
+	if (!syn || !desc || !syn->child || !desc->child) {
+		ast_log(LOG_WARNING, "Cannot find Application description or synopsis for app: '%s'\n", app);
+		return -1;
 	}
 
 	strcpy(tmp->name, app);
 	tmp->execute = execute;
 	tmp->synopsis = syn->child->value.opaque;
-        tmp->description = desc->child->value.opaque;
+	tmp->description = desc->child->value.opaque;
 	tmp->module = mod;
 
 	/* Store in alphabetical order */
@@ -4417,8 +4415,9 @@
 		}
 	}
 	AST_RWLIST_TRAVERSE_SAFE_END;
-	if (!cur)
+	if (!cur) {
 		AST_RWLIST_INSERT_TAIL(&apps, tmp, list);
+	}
 
 	ast_verb(2, "Registered application '%s'\n", term_color(tmps, tmp->name, COLOR_BRCYAN, 0, sizeof(tmps)));
 




More information about the svn-commits mailing list