res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.

Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Corey Farrell
2014-02-27 15:59:15 +00:00
parent bb9dfa1962
commit a6a92ffe3d
2 changed files with 11 additions and 4 deletions

View File

@@ -2738,6 +2738,13 @@ static int set_config(int reload)
goto end;
}
if (options.minrate == 2400 && (options.modems & AST_FAX_MODEM_V27) && !(options.modems & (AST_FAX_MODEM_V34))) {
ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
ast_log(LOG_WARNING, "'modems' setting '%s' is no longer accepted with 'minrate' setting %d\n", modems, options.minrate);
ast_log(LOG_WARNING, "'minrate' has been reset to 4800, please update res_fax.conf.\n");
options.minrate = 4800;
}
if (check_modem_rate(options.modems, options.minrate)) {
ast_fax_modem_to_str(options.modems, modems, sizeof(modems));
ast_log(LOG_ERROR, "'modems' setting '%s' is incompatible with 'minrate' setting %d\n", modems, options.minrate);