Internal timing: Add notice that the -I and internal_timing option are no longer needed.

Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

Review: https://reviewboard.asterisk.org/r/3423/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@411964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/98/198/1
Richard Mudgett 11 years ago
parent 70cdee628c
commit 85a69184c7

@ -3169,6 +3169,13 @@ static void ast_readconfig(void)
/* Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated on a channel */ /* Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated on a channel */
} else if (!strcasecmp(v->name, "transmit_silence_during_record") || !strcasecmp(v->name, "transmit_silence")) { } else if (!strcasecmp(v->name, "transmit_silence_during_record") || !strcasecmp(v->name, "transmit_silence")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSMIT_SILENCE); ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSMIT_SILENCE);
/* Enable internal timing */
} else if (!strcasecmp(v->name, "internal_timing")) {
if (!ast_opt_remote) {
fprintf(stderr,
"NOTICE: The internal_timing option is no longer needed.\n"
" It will always be enabled if you have a timing module loaded.\n");
}
} else if (!strcasecmp(v->name, "maxcalls")) { } else if (!strcasecmp(v->name, "maxcalls")) {
if ((sscanf(v->value, "%30d", &option_maxcalls) != 1) || (option_maxcalls < 0)) { if ((sscanf(v->value, "%30d", &option_maxcalls) != 1) || (option_maxcalls < 0)) {
option_maxcalls = 0; option_maxcalls = 0;
@ -3477,6 +3484,11 @@ int main(int argc, char *argv[])
case 'h': case 'h':
show_cli_help(); show_cli_help();
exit(0); exit(0);
case 'I':
fprintf(stderr,
"NOTICE: The -I option is no longer needed.\n"
" It will always be enabled if you have a timing module loaded.\n");
break;
case 'i': case 'i':
ast_set_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS); ast_set_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS);
break; break;

Loading…
Cancel
Save