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:
Paul Belanger
2010-05-12 01:00:55 +00:00
parent 9534f72cb0
commit 4b1d9f85a7
2 changed files with 81 additions and 84 deletions

View File

@@ -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