diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-05-26 21:47:52 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-05-26 21:47:52 +0000 |
commit | 0f912e5926373f144833b9db4e9c577699a02920 (patch) | |
tree | b95b4a3ff52ff6be585b68f0fbe19dfdaf3965d2 /include | |
parent | 79161454a391d307f821deb45485da2f8a1f0428 (diff) |
Fix various problems in the addition of the ability to mute log/verbose
output to remove consoles. The prototypes added to logger.h still need
doxygen documentation, as well.
- Add the new command line option to the man page
- make the mute option a flag instead of an int since it is only a binary
option
- remove useless extern keywords for prototypes added to logger.h
- rename ast_console_mute() to ast_console_toggle_mute() since that is what
it actually does
- actually apply the mute option to newly created remote consoles instead of
only working when the CLI command is used
- don't imply the NO_FORK option if the mute command line option is provided
- place the new CLI command in the correct place in the list which has to be
in alphabetical order
- Finally, clean up a few spacing issues to conform to the coding guidelines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/logger.h | 4 | ||||
-rw-r--r-- | include/asterisk/options.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h index 9d00fba30..247ac8326 100644 --- a/include/asterisk/logger.h +++ b/include/asterisk/logger.h @@ -82,8 +82,8 @@ int ast_unregister_verbose(void (*verboser)(const char *string, int opos, int re int ast_verbose_dmesg(void (*verboser)(const char *string, int opos, int replacelast, int complete)); void ast_console_puts(const char *string); -extern void ast_console_puts_mutable(const char *string); -extern void ast_console_mute(int fd); +void ast_console_puts_mutable(const char *string); +void ast_console_toggle_mute(int fd); #define _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__ diff --git a/include/asterisk/options.h b/include/asterisk/options.h index bc4c10905..c0b8a433e 100644 --- a/include/asterisk/options.h +++ b/include/asterisk/options.h @@ -76,6 +76,8 @@ enum ast_option_flags { AST_OPT_FLAG_INTERNAL_TIMING = (1 << 20), /*! Always fork, even if verbose or debug settings are non-zero */ AST_OPT_FLAG_ALWAYS_FORK = (1 << 21), + /*! Disable log/verbose output to remote consoles */ + AST_OPT_FLAG_MUTE = (1 << 22) }; /*! These are the options that set by default when Asterisk starts */ @@ -103,6 +105,7 @@ enum ast_option_flags { #define ast_opt_end_cdr_before_h_exten ast_test_flag(&ast_options, AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN) #define ast_opt_internal_timing ast_test_flag(&ast_options, AST_OPT_FLAG_INTERNAL_TIMING) #define ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK) +#define ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE) extern struct ast_flags ast_options; |