diff options
author | anthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-26 17:40:00 +0000 |
---|---|---|
committer | anthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-03-26 17:40:00 +0000 |
commit | 05b8b91755eec074d64f5876ea4172ea068a02b3 (patch) | |
tree | 0bc7d59767e539d79fef5d025f6fe684d5b62968 /apps/app_chanspy.c | |
parent | a6ae5e963d5935d84126c2ff0be4482d398849ea (diff) |
fix volfactor
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5269 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rwxr-xr-x | apps/app_chanspy.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 3fb306bb1..a4ced09ff 100755 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -461,11 +461,10 @@ static int chanspy_exec(struct ast_channel *chan, void *data) bronly = ast_test_flag(&flags, OPTION_BRIDGED); if (ast_test_flag(&flags, OPTION_VOLUME) && opts[1]) { if (sscanf(opts[1], "%d", &volfactor) != 1) - ast_log(LOG_NOTICE, "volfactor must be a number between -16 and 16\n"); - else if (volfactor > 16) - volfactor = 16; - else if (volfactor < -16) - volfactor = -16; + ast_log(LOG_NOTICE, "volfactor must be a number between -4 and 4\n"); + else { + volfactor = minmax(volfactor, 4); + } } } |