mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Convert to AST_CLI_YESNO and AST_CLI_ONOFF
Clean up chan_sip.c to use new AST_CLI functions (closes issue #17287) Reported by: pabelanger Patches: issue17287.patch uploaded by pabelanger (license 224) Tested by: russell git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -64,6 +64,13 @@ void ast_cli(int fd, const char *fmt, ...)
|
||||
*/
|
||||
#define AST_CLI_YESNO(x) (x) ? "Yes" : "No"
|
||||
|
||||
/*! \brief return On or Off depending on the argument.
|
||||
* This is used in many places in CLI command, having a function to generate
|
||||
* this helps maintaining a consistent output (and possibly emitting the
|
||||
* output in other languages, at some point).
|
||||
*/
|
||||
#define AST_CLI_ONOFF(x) (x) ? "On" : "Off"
|
||||
|
||||
/*! \page CLI_command_API CLI command API
|
||||
|
||||
CLI commands are described by a struct ast_cli_entry that contains
|
||||
|
Reference in New Issue
Block a user