mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
fix volfactor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -461,11 +461,10 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
|
|||||||
bronly = ast_test_flag(&flags, OPTION_BRIDGED);
|
bronly = ast_test_flag(&flags, OPTION_BRIDGED);
|
||||||
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[1]) {
|
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[1]) {
|
||||||
if (sscanf(opts[1], "%d", &volfactor) != 1)
|
if (sscanf(opts[1], "%d", &volfactor) != 1)
|
||||||
ast_log(LOG_NOTICE, "volfactor must be a number between -16 and 16\n");
|
ast_log(LOG_NOTICE, "volfactor must be a number between -4 and 4\n");
|
||||||
else if (volfactor > 16)
|
else {
|
||||||
volfactor = 16;
|
volfactor = minmax(volfactor, 4);
|
||||||
else if (volfactor < -16)
|
}
|
||||||
volfactor = -16;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user