From: Anthony Minessale II Date: Sat, 26 Mar 2005 17:40:00 +0000 (+0000) Subject: fix volfactor X-Git-Tag: 1.2.0-beta1~999 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eaa4b200d230cbd5e90abffc7a300df68b4d3bb9;p=thirdparty%2Fasterisk.git fix volfactor git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5269 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 3fb306bb1b..a4ced09ff7 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); + } } }