[Asterisk-cvs] asterisk/apps app_chanspy.c,1.4,1.5

anthm at lists.digium.com anthm at lists.digium.com
Sat Mar 26 11:45:58 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv11490/apps

Modified Files:
	app_chanspy.c 
Log Message:
fix volfactor

Index: app_chanspy.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanspy.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- app_chanspy.c	24 Mar 2005 03:31:07 -0000	1.4
+++ app_chanspy.c	26 Mar 2005 17:40:00 -0000	1.5
@@ -461,11 +461,10 @@
 		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);
+			}
 		}
 	}
 




More information about the svn-commits mailing list