From: Sean Bright Date: Fri, 18 Dec 2020 15:16:38 +0000 (-0500) Subject: asterisk: Export additional manager functions X-Git-Tag: 18.2.0-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68d3d3af6f3504be39c7a9352a413f5243bab5e1;p=thirdparty%2Fasterisk.git asterisk: Export additional manager functions Rename check_manager_enabled() and check_webmanager_enabled() to begin with ast_ so that the symbols are automatically exported by the linker. ASTERISK~29184 Change-Id: I85762b9a5d14500c15f6bad6507138c8858644c9 --- diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index d198bd42fa..24811bc398 100644 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -115,10 +115,10 @@ struct manager_custom_hook { }; /*! \brief Check if AMI is enabled */ -int check_manager_enabled(void); +int ast_manager_check_enabled(void); /*! \brief Check if AMI/HTTP is enabled */ -int check_webmanager_enabled(void); +int ast_webmanager_check_enabled(void); /*! Add a custom hook to be called when an event is fired \param hook struct manager_custom_hook object to add diff --git a/main/asterisk.c b/main/asterisk.c index a028611dba..ec1d5dbba8 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -537,8 +537,8 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c ast_cli(a->fd, "\n* Subsystems\n"); ast_cli(a->fd, " -------------\n"); - ast_cli(a->fd, " Manager (AMI): %s\n", check_manager_enabled() ? "Enabled" : "Disabled"); - ast_cli(a->fd, " Web Manager (AMI/HTTP): %s\n", check_webmanager_enabled() ? "Enabled" : "Disabled"); + ast_cli(a->fd, " Manager (AMI): %s\n", ast_manager_check_enabled() ? "Enabled" : "Disabled"); + ast_cli(a->fd, " Web Manager (AMI/HTTP): %s\n", ast_webmanager_check_enabled() ? "Enabled" : "Disabled"); ast_cli(a->fd, " Call data records: %s\n", ast_cdr_is_enabled() ? "Enabled" : "Disabled"); ast_cli(a->fd, " Realtime Architecture (ARA): %s\n", ast_realtime_enabled() ? "Enabled" : "Disabled"); diff --git a/main/manager.c b/main/manager.c index 562a7ea088..fc99c96350 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1946,12 +1946,12 @@ void ast_manager_unregister_hook(struct manager_custom_hook *hook) AST_RWLIST_UNLOCK(&manager_hooks); } -int check_manager_enabled(void) +int ast_manager_check_enabled(void) { return manager_enabled; } -int check_webmanager_enabled(void) +int ast_webmanager_check_enabled(void) { return (webmanager_enabled && manager_enabled); } @@ -6309,7 +6309,7 @@ static int action_coresettings(struct mansession *s, const struct message *m) ast_option_maxfiles, AST_CLI_YESNO(ast_realtime_enabled()), AST_CLI_YESNO(ast_cdr_is_enabled()), - AST_CLI_YESNO(check_webmanager_enabled()) + AST_CLI_YESNO(ast_webmanager_check_enabled()) ); return 0; }