[Asterisk-code-review] asterisk: Export additional manager functions (asterisk[16])

George Joseph asteriskteam at digium.com
Wed Jan 6 09:11:22 CST 2021


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15226 )

Change subject: asterisk: Export additional manager functions
......................................................................

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
---
M include/asterisk/manager.h
M main/asterisk.c
M main/manager.c
3 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 910eb5d..350772e 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -115,10 +115,10 @@
 };
 
 /*! \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 1061fd0..d903113 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -534,8 +534,8 @@
 
 	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 e97715d..f938b4e 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1946,12 +1946,12 @@
 	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 @@
 			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;
 }

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15226
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I85762b9a5d14500c15f6bad6507138c8858644c9
Gerrit-Change-Number: 15226
Gerrit-PatchSet: 4
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210106/ab442b87/attachment.html>


More information about the asterisk-code-review mailing list