[asterisk-commits] coreyfarrell: branch coreyfarrell/module-loader-experiment r431897 - in /team...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 16 16:29:32 CST 2015


Author: coreyfarrell
Date: Mon Feb 16 16:29:26 2015
New Revision: 431897

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431897
Log:
Remove support for disabling xmldocs.

Added:
    team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment   (with props)
Modified:
    team/coreyfarrell/module-loader-experiment/channels/chan_sip.c
    team/coreyfarrell/module-loader-experiment/configure
    team/coreyfarrell/module-loader-experiment/configure.ac
    team/coreyfarrell/module-loader-experiment/include/asterisk/data.h
    team/coreyfarrell/module-loader-experiment/include/asterisk/xml.h
    team/coreyfarrell/module-loader-experiment/include/asterisk/xmldoc.h
    team/coreyfarrell/module-loader-experiment/main/asterisk.c
    team/coreyfarrell/module-loader-experiment/main/config_options.c
    team/coreyfarrell/module-loader-experiment/main/data.c
    team/coreyfarrell/module-loader-experiment/main/manager.c
    team/coreyfarrell/module-loader-experiment/main/pbx.c
    team/coreyfarrell/module-loader-experiment/main/xml.c
    team/coreyfarrell/module-loader-experiment/main/xmldoc.c
    team/coreyfarrell/module-loader-experiment/res/res_agi.c

Added: team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment?view=auto&rev=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment (added)
+++ team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment Mon Feb 16 16:29:26 2015
@@ -1,0 +1,4 @@
+Core
+------------------
+ * XMLDOC's are no longer optional.
+   This makes LIBXML2 and LIBXSLT required dependencies.

Propchange: team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/coreyfarrell/module-loader-experiment/CHANGES-module-loader-experiment
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/coreyfarrell/module-loader-experiment/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/channels/chan_sip.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/channels/chan_sip.c (original)
+++ team/coreyfarrell/module-loader-experiment/channels/chan_sip.c Mon Feb 16 16:29:26 2015
@@ -918,14 +918,12 @@
 static int esc_etag_counter;
 static const int DEFAULT_PUBLISH_EXPIRES = 3600;
 
-#ifdef HAVE_LIBXML2
 static int cc_esc_publish_handler(struct sip_pvt *pvt, struct sip_request *req, struct event_state_compositor *esc, struct sip_esc_entry *esc_entry);
 
 static const struct sip_esc_publish_callbacks cc_esc_publish_callbacks = {
 	.initial_handler = cc_esc_publish_handler,
 	.modify_handler = cc_esc_publish_handler,
 };
-#endif
 
 /*!
  * \brief The Event State Compositors
@@ -945,9 +943,7 @@
 	const struct sip_esc_publish_callbacks *callbacks;
 	struct ao2_container *compositor;
 } event_state_compositors [] = {
-#ifdef HAVE_LIBXML2
 	{CALL_COMPLETION, "call-completion", &cc_esc_publish_callbacks},
-#endif
 };
 
 struct state_notify_data {
@@ -26887,7 +26883,6 @@
 	return SIP_PUBLISH_UNKNOWN;
 }
 
-#ifdef HAVE_LIBXML2
 static int pidf_validate_tuple(struct ast_xml_node *tuple_node)
 {
 	const char *id;
@@ -27146,7 +27141,6 @@
 	return res;
 }
 
-#endif /* HAVE_LIBXML2 */
 
 static int handle_sip_publish_initial(struct sip_pvt *p, struct sip_request *req, struct event_state_compositor *esc, const int expires)
 {
@@ -32916,11 +32910,7 @@
 
 static int sip_is_xml_parsable(void)
 {
-#ifdef HAVE_LIBXML2
 	return TRUE;
-#else
-	return FALSE;
-#endif
 }
 
 /*! \brief Send a poke to all known peers */

Modified: team/coreyfarrell/module-loader-experiment/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/configure.ac?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/configure.ac (original)
+++ team/coreyfarrell/module-loader-experiment/configure.ac Mon Feb 16 16:29:26 2015
@@ -585,21 +585,8 @@
 
 AST_EXT_LIB_CHECK([URIPARSER], [uriparser], [uriParseUriA], [uriparser/Uri.h])
 
-# Another mandatory item (unless it's explicitly disabled)
-AC_ARG_ENABLE([xmldoc],
-	[AS_HELP_STRING([--disable-xmldoc],
-		[Explicitly disable XML documentation])],
-	[case "${enableval}" in
-		y|ye|yes) disable_xmldoc=no ;;
-		n|no)  disable_xmldoc=yes ;;
-		*) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc)  ;;
-	esac], [disable_xmldoc=no])
-
-if test "${disable_xmldoc}" != "yes"; then
-        AST_EXT_LIB_CHECK([LIBXSLT], [xslt], [xsltLoadStylesheetPI], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
-        AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
-
-fi
+AST_EXT_LIB_CHECK([LIBXSLT], [xslt], [xsltLoadStylesheetPI], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
+AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])
 
 # some embedded systems omit internationalization (locale) support
 AC_CHECK_HEADERS([xlocale.h])

Modified: team/coreyfarrell/module-loader-experiment/include/asterisk/data.h
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/include/asterisk/data.h?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/include/asterisk/data.h (original)
+++ team/coreyfarrell/module-loader-experiment/include/asterisk/data.h Mon Feb 16 16:29:26 2015
@@ -432,7 +432,6 @@
  */
 struct ast_data *ast_data_get(const struct ast_data_query *query);
 
-#ifdef HAVE_LIBXML2
 /*!
  * \brief Retrieve a subtree from the asterisk data API in XML format..
  * \param[in] query The query structure specifying what nodes to retrieve.
@@ -442,7 +441,6 @@
  * \see ast_data_free, ast_data_get
  */
 struct ast_xml_doc *ast_data_get_xml(const struct ast_data_query *query);
-#endif
 
 /*!
  * \brief Release the allocated memory of a tree.

Modified: team/coreyfarrell/module-loader-experiment/include/asterisk/xml.h
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/include/asterisk/xml.h?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/include/asterisk/xml.h (original)
+++ team/coreyfarrell/module-loader-experiment/include/asterisk/xml.h Mon Feb 16 16:29:26 2015
@@ -246,10 +246,5 @@
  */
 struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str);
 
-/* Features using ast_xml_ */
-#ifdef HAVE_LIBXML2
-#define AST_XML_DOCS
-#endif
-
 #endif /* _ASTERISK_XML_H */
 

Modified: team/coreyfarrell/module-loader-experiment/include/asterisk/xmldoc.h
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/include/asterisk/xmldoc.h?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/include/asterisk/xmldoc.h (original)
+++ team/coreyfarrell/module-loader-experiment/include/asterisk/xmldoc.h Mon Feb 16 16:29:26 2015
@@ -31,8 +31,6 @@
 	AST_XML_DOC,            /*!< From XML documentation */
 	AST_STATIC_DOC          /*!< From application/function registration */
 };
-
-#ifdef AST_XML_DOCS
 
 struct ao2_container;
 struct ast_xml_node;
@@ -201,6 +199,4 @@
  */
 int ast_xmldoc_regenerate_doc_item(struct ast_xml_doc_item *item);
 
-#endif /* AST_XML_DOCS */
-
 #endif /* _ASTERISK_XMLDOC_H */

Modified: team/coreyfarrell/module-loader-experiment/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/asterisk.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/asterisk.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/asterisk.c Mon Feb 16 16:29:26 2015
@@ -4437,10 +4437,8 @@
 		exit(1);
 	}
 
-#ifdef AST_XML_DOCS
 	/* Load XML documentation. */
 	ast_xmldoc_load_documentation();
-#endif
 
 	aco_init();
 

Modified: team/coreyfarrell/module-loader-experiment/main/config_options.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/config_options.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/config_options.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/config_options.c Mon Feb 16 16:29:26 2015
@@ -76,9 +76,7 @@
 	intptr_t args[0];
 };
 
-#ifdef AST_XML_DOCS
 static struct ao2_container *xmldocs;
-#endif /* AST_XML_DOCS */
 
 /*! \brief Value of the aco_option_type enum as strings */
 static char *aco_option_type_string[] = {
@@ -126,10 +124,8 @@
 static int noop_handler_fn(const struct aco_option *opt, struct ast_variable *var, void *obj);
 static int chararray_handler_fn(const struct aco_option *opt, struct ast_variable *var, void *obj);
 
-#ifdef AST_XML_DOCS
 static int xmldoc_update_config_type(const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, unsigned int matches);
 static int xmldoc_update_config_option(struct aco_type **types, const char *module, const char *name, const char *object_name, const char *default_value, unsigned int regex, enum aco_option_type type);
-#endif
 
 static aco_option_handler ast_config_option_default_handler(enum aco_option_type type)
 {
@@ -184,12 +180,9 @@
 			return -1;
 		}
 		if (!ao2_link(type->internal->opts, opt)
-#ifdef AST_XML_DOCS
 				|| (!info->hidden &&
 					!opt->no_doc &&
-					xmldoc_update_config_option(types, info->module, opt->name, type->name, opt->default_val, opt->match_type == ACO_REGEX, opt->type))
-#endif /* AST_XML_DOCS */
-		) {
+					xmldoc_update_config_option(types, info->module, opt->name, type->name, opt->default_val, opt->match_type == ACO_REGEX, opt->type))) {
 			do {
 				ao2_unlink(types[idx - 1]->internal->opts, opt);
 			} while (--idx);
@@ -237,7 +230,6 @@
 	return option->args[position];
 }
 
-#ifdef AST_XML_DOCS
 /*! \internal
  * \brief Find a particular ast_xml_doc_item from it's parent config_info, types, and name
  */
@@ -281,8 +273,6 @@
 	}
 	return iter;
 }
-
-#endif /* AST_XML_DOCS */
 
 int __aco_option_register(struct aco_info *info, const char *name, enum aco_matchtype matchtype, struct aco_type **types,
 	const char *default_val, enum aco_option_type kind, aco_option_handler handler, unsigned int flags,
@@ -801,13 +791,11 @@
 			if (internal_type_init(type)) {
 				goto error;
 			}
-#ifdef AST_XML_DOCS
 			if (!info->hidden &&
 				!type->hidden &&
 				xmldoc_update_config_type(info->module, type->name, type->category, type->matchfield, type->matchvalue, type->category_match == ACO_WHITELIST)) {
 				goto error;
 			}
-#endif /* AST_XML_DOCS */
 		}
 		y = 0;
 	}
@@ -863,8 +851,6 @@
 
 	return 0;
 }
-
-#ifdef AST_XML_DOCS
 
 /*! \internal
  * \brief Complete the name of the module the user is looking for
@@ -1276,18 +1262,15 @@
 	ast_cli_unregister(cli_aco);
 	ao2_cleanup(xmldocs);
 }
-#endif /* AST_XML_DOCS */
 
 int aco_init(void)
 {
-#ifdef AST_XML_DOCS
 	ast_register_atexit(aco_deinit);
 	if (!(xmldocs = ast_xmldoc_build_documentation("configInfo"))) {
 		ast_log(LOG_ERROR, "Couldn't build config documentation\n");
 		return -1;
 	}
 	ast_cli_register_multiple(cli_aco, ARRAY_LEN(cli_aco));
-#endif /* AST_XML_DOCS */
 	return 0;
 }
 

Modified: team/coreyfarrell/module-loader-experiment/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/data.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/data.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/data.c Mon Feb 16 16:29:26 2015
@@ -2085,7 +2085,6 @@
 	return res;
 }
 
-#ifdef HAVE_LIBXML2
 /*!
  * \internal
  * \brief Helper function to move an ast_data tree to xml.
@@ -2209,7 +2208,6 @@
 
 	return doc;
 }
-#endif
 
 enum ast_data_type ast_data_retrieve_type(struct ast_data *node, const char *path)
 {

Modified: team/coreyfarrell/module-loader-experiment/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/manager.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/manager.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/manager.c Mon Feb 16 16:29:26 2015
@@ -2161,10 +2161,8 @@
 	int num, l, which;
 	const char *auth_str;
 	char *ret = NULL;
-#ifdef AST_XML_DOCS
 	char syntax_title[64], description_title[64], synopsis_title[64], seealso_title[64];
 	char arguments_title[64], privilege_title[64], final_response_title[64], list_responses_title[64];
-#endif
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -2191,7 +2189,6 @@
 		return CLI_SHOWUSAGE;
 	}
 
-#ifdef AST_XML_DOCS
 	/* setup the titles */
 	term_color(synopsis_title, "[Synopsis]\n", COLOR_MAGENTA, 0, 40);
 	term_color(description_title, "[Description]\n", COLOR_MAGENTA, 0, 40);
@@ -2201,7 +2198,6 @@
 	term_color(privilege_title, "[Privilege]\n", COLOR_MAGENTA, 0, 40);
 	term_color(final_response_title, "[Final Response]\n", COLOR_MAGENTA, 0, 40);
 	term_color(list_responses_title, "[List Responses]\n", COLOR_MAGENTA, 0, 40);
-#endif
 
 	AST_RWLIST_RDLOCK(&actions);
 	AST_RWLIST_TRAVERSE(&actions, cur, list) {
@@ -2209,7 +2205,6 @@
 			if (!strcasecmp(cur->action, a->argv[num])) {
 				auth_str = authority_to_str(cur->authority, &authority);
 
-#ifdef AST_XML_DOCS
 				if (cur->docsrc == AST_XML_DOC) {
 					char *syntax = ast_xmldoc_printable(S_OR(cur->syntax, "Not available"), 1);
 					char *synopsis = ast_xmldoc_printable(S_OR(cur->synopsis, "Not available"), 1);
@@ -2245,9 +2240,7 @@
 						ast_cli(a->fd, "Event: %s\n", cur->final_response->name);
 						print_event_instance(a, cur->final_response);
 					}
-				} else
-#endif
-				{
+				} else {
 					ast_cli(a->fd, "Action: %s\nSynopsis: %s\nPrivilege: %s\n%s\n",
 						cur->action, cur->synopsis,
 						auth_str,
@@ -6837,7 +6830,6 @@
 	cur->authority = auth;
 	cur->func = func;
 	cur->module = module;
-#ifdef AST_XML_DOCS
 	if (ast_strlen_zero(synopsis) && ast_strlen_zero(description)) {
 		char *tmpxml;
 
@@ -6865,14 +6857,10 @@
 		cur->list_responses = ast_xmldoc_build_list_responses("manager", action, NULL);
 
 		cur->docsrc = AST_XML_DOC;
-	} else
-#endif
-	{
+	} else {
 		ast_string_field_set(cur, synopsis, synopsis);
 		ast_string_field_set(cur, description, description);
-#ifdef AST_XML_DOCS
 		cur->docsrc = AST_STATIC_DOC;
-#endif
 	}
 	if (ast_manager_register_struct(cur)) {
 		ao2_t_ref(cur, -1, "action object registration failed");
@@ -8170,8 +8158,6 @@
 	return CLI_SUCCESS;
 }
 
-#ifdef AST_XML_DOCS
-
 static int ast_xml_doc_item_cmp_fn(const void *a, const void *b)
 {
 	struct ast_xml_doc_item **item_a = (struct ast_xml_doc_item **)a;
@@ -8354,8 +8340,6 @@
 	return CLI_SUCCESS;
 }
 
-#endif
-
 static struct ast_cli_entry cli_manager[] = {
 	AST_CLI_DEFINE(handle_showmancmd, "Show a manager interface command"),
 	AST_CLI_DEFINE(handle_showmancmds, "List manager interface commands"),
@@ -8366,10 +8350,8 @@
 	AST_CLI_DEFINE(handle_mandebug, "Show, enable, disable debugging of the manager code"),
 	AST_CLI_DEFINE(handle_manager_reload, "Reload manager configurations"),
 	AST_CLI_DEFINE(handle_manager_show_settings, "Show manager global settings"),
-#ifdef AST_XML_DOCS
 	AST_CLI_DEFINE(handle_manager_show_events, "List manager interface events"),
 	AST_CLI_DEFINE(handle_manager_show_event, "Show a manager interface event"),
-#endif
 };
 
 /*!
@@ -8467,9 +8449,7 @@
 	ast_custom_function_unregister(&managerclient_function);
 	ast_cli_unregister_multiple(cli_manager, ARRAY_LEN(cli_manager));
 
-#ifdef AST_XML_DOCS
 	ao2_t_global_obj_release(event_docs, "Dispose of event_docs");
-#endif
 
 #ifdef TEST_FRAMEWORK
 	stasis_forward_cancel(test_suite_forwarder);
@@ -8613,9 +8593,7 @@
 
 	if (!reload) {
 		struct ao2_container *sessions;
-#ifdef AST_XML_DOCS
 		struct ao2_container *temp_event_docs;
-#endif
 		int res;
 
 		ast_register_atexit(manager_shutdown);
@@ -8681,13 +8659,11 @@
 			return -1;
 		}
 
-#ifdef AST_XML_DOCS
 		temp_event_docs = ast_xmldoc_build_documentation("managerEvent");
 		if (temp_event_docs) {
 			ao2_t_global_obj_replace_unref(event_docs, temp_event_docs, "Toss old event docs");
 			ao2_t_ref(temp_event_docs, -1, "Remove creation ref - container holds only ref now");
 		}
-#endif
 
 		/* If you have a NULL hash fn, you only need a single bucket */
 		sessions = ao2_container_alloc(1, NULL, mansession_cmp_fn);

Modified: team/coreyfarrell/module-loader-experiment/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/pbx.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/pbx.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/pbx.c Mon Feb 16 16:29:26 2015
@@ -994,9 +994,7 @@
 		AST_STRING_FIELD(arguments);    /*!< Arguments description */
 		AST_STRING_FIELD(seealso);      /*!< See also */
 	);
-#ifdef AST_XML_DOCS
 	enum ast_doc_src docsrc;		/*!< Where the documentation come from. */
-#endif
 	AST_RWLIST_ENTRY(ast_app) list;		/*!< Next app in list */
 	struct ast_module *module;		/*!< Module this app belongs to */
 	char name[0];				/*!< Name of the application */
@@ -3944,15 +3942,12 @@
 	term_color(argtitle, "[Arguments]\n", COLOR_MAGENTA, 0, 40);
 	term_color(seealsotitle, "[See Also]\n", COLOR_MAGENTA, 0, 40);
 	term_color(syntax, S_OR(acf->syntax, "Not available"), COLOR_CYAN, 0, syntax_size);
-#ifdef AST_XML_DOCS
 	if (acf->docsrc == AST_XML_DOC) {
 		arguments = ast_xmldoc_printable(S_OR(acf->arguments, "Not available"), 1);
 		synopsis = ast_xmldoc_printable(S_OR(acf->synopsis, "Not available"), 1);
 		description = ast_xmldoc_printable(S_OR(acf->desc, "Not available"), 1);
 		seealso = ast_xmldoc_printable(S_OR(acf->seealso, "Not available"), 1);
-	} else
-#endif
-	{
+	} else {
 		synopsis_size = strlen(S_OR(acf->synopsis, "Not Available")) + AST_TERM_MAX_ESCAPE_CHARS;
 		synopsis = ast_malloc(synopsis_size);
 
@@ -4037,11 +4032,9 @@
 
 	AST_RWLIST_WRLOCK(&acf_root);
 	if ((cur = AST_RWLIST_REMOVE(&acf_root, acf, acflist))) {
-#ifdef AST_XML_DOCS
 		if (cur->docsrc == AST_XML_DOC) {
 			ast_string_field_free_memory(acf);
 		}
-#endif
 		ast_verb(2, "Unregistered custom function %s\n", cur->name);
 	}
 	AST_RWLIST_UNLOCK(&acf_root);
@@ -4081,7 +4074,6 @@
  */
 static int acf_retrieve_docs(struct ast_custom_function *acf)
 {
-#ifdef AST_XML_DOCS
 	char *tmpxml;
 
 	/* Let's try to find it in the Documentation XML */
@@ -4119,7 +4111,6 @@
 	ast_free(tmpxml);
 
 	acf->docsrc = AST_XML_DOC;
-#endif
 
 	return 0;
 }
@@ -4133,9 +4124,7 @@
 	}
 
 	acf->mod = mod;
-#ifdef AST_XML_DOCS
 	acf->docsrc = AST_STATIC_DOC;
-#endif
 
 	if (acf_retrieve_docs(acf)) {
 		return -1;
@@ -7181,9 +7170,7 @@
 	struct ast_app *tmp;
 	struct ast_app *cur;
 	int length;
-#ifdef AST_XML_DOCS
 	char *tmpxml;
-#endif
 
 	AST_RWLIST_WRLOCK(&apps);
 	cur = pbx_findapp_nolock(app);
@@ -7210,7 +7197,6 @@
 	tmp->execute = execute;
 	tmp->module = mod;
 
-#ifdef AST_XML_DOCS
 	/* Try to lookup the docs in our XML documentation database */
 	if (ast_strlen_zero(synopsis) && ast_strlen_zero(description)) {
 		/* load synopsis */
@@ -7239,13 +7225,10 @@
 		ast_free(tmpxml);
 		tmp->docsrc = AST_XML_DOC;
 	} else {
-#endif
 		ast_string_field_set(tmp, synopsis, synopsis);
 		ast_string_field_set(tmp, description, description);
-#ifdef AST_XML_DOCS
 		tmp->docsrc = AST_STATIC_DOC;
 	}
-#endif
 
 	/* Store in alphabetical order */
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&apps, cur, list) {
@@ -7300,7 +7283,6 @@
 
 static void print_app_docs(struct ast_app *aa, int fd)
 {
-#ifdef AST_XML_DOCS
 	char *synopsis = NULL, *description = NULL, *arguments = NULL, *seealso = NULL;
 	if (aa->docsrc == AST_XML_DOC) {
 		synopsis = ast_xmldoc_printable(S_OR(aa->synopsis, "Not available"), 1);
@@ -7334,9 +7316,7 @@
 		ast_free(description);
 		ast_free(arguments);
 		ast_free(seealso);
-	} else
-#endif
-	{
+	} else {
 		ast_cli(fd, "\n"
 			"%s  -= Info about application '%s' =- %s\n\n"
 			COLORIZE_FMT "\n"

Modified: team/coreyfarrell/module-loader-experiment/main/xml.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/xml.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/xml.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/xml.c Mon Feb 16 16:29:26 2015
@@ -33,16 +33,12 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#if defined(HAVE_LIBXML2)
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
 #include <libxml/xpath.h>
-/* libxml2 ast_xml implementation. */
-#ifdef HAVE_LIBXSLT
-	#include <libxslt/xsltInternals.h>
-	#include <libxslt/transform.h>
-#endif /* HAVE_LIBXSLT */
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
 
 
 int ast_xml_init(void)
@@ -81,7 +77,6 @@
 		return NULL;
 	}
 
-#ifdef HAVE_LIBXSLT
 	{
 		xsltStylesheetPtr xslt = xsltLoadStylesheetPI(doc);
 		if (xslt) {
@@ -94,9 +89,6 @@
 			doc = tmpdoc;
 		}
 	}
-#else /* no HAVE_LIBXSLT */
-	ast_log(LOG_NOTICE, "XSLT support not found. XML documentation may be incomplete.\n");
-#endif /* HAVE_LIBXSLT */
 
 	return (struct ast_xml_doc *) doc;
 }
@@ -381,6 +373,3 @@
 	}
 	return (struct ast_xml_xpath_results *) result;
 }
-
-#endif /* defined(HAVE_LIBXML2) */
-

Modified: team/coreyfarrell/module-loader-experiment/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/main/xmldoc.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/main/xmldoc.c (original)
+++ team/coreyfarrell/module-loader-experiment/main/xmldoc.c Mon Feb 16 16:29:26 2015
@@ -39,8 +39,6 @@
 #include "asterisk/astobj2.h"
 #include "asterisk/xmldoc.h"
 #include "asterisk/cli.h"
-
-#ifdef AST_XML_DOCS
 
 /*! \brief Default documentation language. */
 static const char default_documentation_language[] = "en_US";
@@ -3040,6 +3038,3 @@
 	return 0;
 }
 
-#endif /* AST_XML_DOCS */
-
-

Modified: team/coreyfarrell/module-loader-experiment/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/team/coreyfarrell/module-loader-experiment/res/res_agi.c?view=diff&rev=431897&r1=431896&r2=431897
==============================================================================
--- team/coreyfarrell/module-loader-experiment/res/res_agi.c (original)
+++ team/coreyfarrell/module-loader-experiment/res/res_agi.c Mon Feb 16 16:29:26 2015
@@ -3412,13 +3412,11 @@
 	if (!find_command(cmd->cmda, 1)) {
 		*((enum ast_doc_src *) &cmd->docsrc) = AST_STATIC_DOC;
 		if (ast_strlen_zero(cmd->summary) && ast_strlen_zero(cmd->usage)) {
-#ifdef AST_XML_DOCS
 			*((char **) &cmd->summary) = ast_xmldoc_build_synopsis("agi", fullcmd, NULL);
 			*((char **) &cmd->usage) = ast_xmldoc_build_description("agi", fullcmd, NULL);
 			*((char **) &cmd->syntax) = ast_xmldoc_build_syntax("agi", fullcmd, NULL);
 			*((char **) &cmd->seealso) = ast_xmldoc_build_seealso("agi", fullcmd, NULL);
 			*((enum ast_doc_src *) &cmd->docsrc) = AST_XML_DOC;
-#endif
 #ifndef HAVE_NULLSAFE_PRINTF
 			if (!cmd->summary) {
 				*((char **) &cmd->summary) = ast_strdup("");
@@ -3463,7 +3461,6 @@
 			AST_RWLIST_REMOVE_CURRENT(list);
 			if (mod != ast_module_info->self)
 				ast_module_unref(ast_module_info->self);
-#ifdef AST_XML_DOCS
 			if (e->docsrc == AST_XML_DOC) {
 				ast_free((char *) e->summary);
 				ast_free((char *) e->usage);
@@ -3474,7 +3471,6 @@
 				*((char **) &e->syntax) = NULL;
 				*((char **) &e->seealso) = NULL;
 			}
-#endif
 			unregistered=1;
 			break;
 		}
@@ -3948,7 +3944,6 @@
 			ast_join(fullcmd, sizeof(fullcmd), a->argv + e->args);
 			snprintf(info, sizeof(info), "\n  -= Info about agi '%s' =- ", fullcmd);
 			term_color(infotitle, info, COLOR_CYAN, 0, sizeof(infotitle));
-#ifdef AST_XML_DOCS
 			if (command->docsrc == AST_XML_DOC) {
 				synopsis = ast_xmldoc_printable(S_OR(command->summary, "Not available"), 1);
 				description = ast_xmldoc_printable(S_OR(command->usage, "Not available"), 1);
@@ -3957,9 +3952,7 @@
 					error = 1;
 					goto return_cleanup;
 				}
-			} else
-#endif
-			{
+			} else {
 				synlen = strlen(S_OR(command->summary, "Not available")) + AST_TERM_MAX_ESCAPE_CHARS;
 				synopsis = ast_malloc(synlen);
 
@@ -4065,11 +4058,7 @@
 
 		fprintf(htmlfile, "<TR><TD><TABLE BORDER=\"1\" CELLPADDING=\"5\" WIDTH=\"100%%\">\n");
 		fprintf(htmlfile, "<TR><TH ALIGN=\"CENTER\"><B>%s - %s</B></TH></TR>\n", fullcmd, command->summary);
-#ifdef AST_XML_DOCS
 		stringp = ast_xmldoc_printable(command->usage, 0);
-#else
-		stringp = ast_strdup(command->usage);
-#endif
 		tempstr = strsep(&stringp, "\n");
 
 		fprintf(htmlfile, "<TR><TD ALIGN=\"CENTER\">");




More information about the asterisk-commits mailing list