From 325eeced6a7edea019cc6a013460f617d10bfc28 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Wed, 5 Jul 2017 11:29:01 -0400 Subject: core: Remove 'Data Retrieval API' This API was not actively maintained, was not added to new modules (such as res_pjsip), and there exist better alternatives to acquire the same information, such as the ARI. Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83 --- main/pbx.c | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) (limited to 'main/pbx.c') diff --git a/main/pbx.c b/main/pbx.c index ccfba054e..2366b72b0 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -8306,56 +8306,6 @@ static void presence_state_cb(void *unused, struct stasis_subscription *sub, str ast_free(hint_app); } -/*! - * \internal - * \brief Implements the hints data provider. - */ -static int hints_data_provider_get(const struct ast_data_search *search, - struct ast_data *data_root) -{ - struct ast_data *data_hint; - struct ast_hint *hint; - int watchers; - struct ao2_iterator i; - - if (ao2_container_count(hints) == 0) { - return 0; - } - - i = ao2_iterator_init(hints, 0); - for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) { - watchers = ao2_container_count(hint->callbacks); - data_hint = ast_data_add_node(data_root, "hint"); - if (!data_hint) { - continue; - } - ast_data_add_str(data_hint, "extension", ast_get_extension_name(hint->exten)); - ast_data_add_str(data_hint, "context", ast_get_context_name(ast_get_extension_context(hint->exten))); - ast_data_add_str(data_hint, "application", ast_get_extension_app(hint->exten)); - ast_data_add_str(data_hint, "state", ast_extension_state2str(hint->laststate)); - ast_data_add_str(data_hint, "presence_state", ast_presence_state2str(hint->last_presence_state)); - ast_data_add_str(data_hint, "presence_subtype", S_OR(hint->last_presence_subtype, "")); - ast_data_add_str(data_hint, "presence_subtype", S_OR(hint->last_presence_message, "")); - ast_data_add_int(data_hint, "watchers", watchers); - - if (!ast_data_search_match(search, data_hint)) { - ast_data_remove_node(data_root, data_hint); - } - } - ao2_iterator_destroy(&i); - - return 0; -} - -static const struct ast_data_handler hints_data_provider = { - .version = AST_DATA_HANDLER_VERSION, - .get = hints_data_provider_get -}; - -static const struct ast_data_entry pbx_data_providers[] = { - AST_DATA_ENTRY("asterisk/core/hints", &hints_data_provider), -}; - static int action_extensionstatelist(struct mansession *s, const struct message *m) { const char *action_id = astman_get_header(m, "ActionID"); @@ -8431,7 +8381,6 @@ static void unload_pbx(void) ast_cli_unregister_multiple(pbx_cli, ARRAY_LEN(pbx_cli)); ast_custom_function_unregister(&exception_function); ast_custom_function_unregister(&testtime_function); - ast_data_unregister(NULL); } int load_pbx(void) @@ -8445,7 +8394,6 @@ int load_pbx(void) ast_verb(2, "Registering builtin functions:\n"); ast_cli_register_multiple(pbx_cli, ARRAY_LEN(pbx_cli)); - ast_data_register_multiple_core(pbx_data_providers, ARRAY_LEN(pbx_data_providers)); __ast_custom_function_register(&exception_function, NULL); __ast_custom_function_register(&testtime_function, NULL); -- cgit v1.2.3